Developers
Mostly about Wild Apricot API. Feel free to share examples of your code!
78 results found
-
Demo Joomla Authentication Module
Hi,
I've got a Joomla authentication module working with WildApricot which I'm making available for anyone to use.I'm not a PHP coder or joomla expert, so take this with a grain of salt and understand it will need customisation for your site. I've loaded the source on github. I'd recommend it only experienced Joomla/PHP users and you will need to alter it.
Hopefully someone with more experience can take this code and make it more generic so others may benefit.
https://github.com/psike73/joomla_waauth
Allows authentication against WildApricot user/password.
Add or remove to defined Joomla groups (ie. member and non-members group)
Add…0 votes -
API - Implement CORS for Cross-Domain API requests
Currently the API does not support cross-domain requests which makes it impossible to call the API from within WA or any other site. The whole Idea of API's and web services is to be able to fetch data from other sites to use in you JavaScript code.
I can only get access to the API if I disable cross-domain security in IE. Other browsers are more difficult.
CORS is a web standard that was developed to handle cross-domain requests. It should be fairly simple to adjust your web server to handle CORS and pre-flighting
1 voteCORS is not implemented, but it is possible to access public API from JS hosted on yourdomain.wildapricot.org. Please refer to http://help.wildapricot.com/display/DOC/Authenticating+API+access+from+a+Wild+Apricot+site+page for more details.
-
API V2 authorization "invalid_client" error
Hi, I'm trying to do v2 authorization (from Java), and getting an invalid client error.
My setup reads (edited for brevity):
HttpPost post = new HttpPost(AUTH_URL+"/auth/token");
post.addHeader("Content-Type","application/x-www-form-urlencoded");
post.addHeader("Authentication","Basic "+Base64.encodeBase64String("APIKEY:"+API_KEY));
List <NameValuePair> nvps = new ArrayList <NameValuePair>();
nvps.add(new BasicNameValuePair("granttype", "clientcredentials"));
nvps.add(new BasicNameValuePair("scope", "account"));
post.setEntity(new UrlEncodedFormEntity(nvps));This seems a perfect mirror of the php and c# samples, but in return, I'm getting the remarkably useful:{"error":"invalidclient","errordescription":null,"error_uri":null} Any ideas?Thanks,GeePawHill
0 votesThe problem was caused by invalid header name.
-
Access to image fields through the API
Please add access to the image fields through the API - I would like to be able to get the URL of the image the member uploaded.
11 votesWe added access to contact’s image fields via API in 5.9 release. Note that you can get it only in 2.1 version of API (https://api.wildapricot.org/v2.1/ instead of https://api.wildapricot.org/v2/ for version 2).
Retrieving contact fields: https://help.wildapricot.com/display/DOC/Contacts+API+V2+call
Uploading pictures: https://help.wildapricot.com/display/DOC/Pictures+API+V2+call -
Authenticating a Member or Contact (with iOS app)
Hi - I am writing a custom iOS app using the WA API and a requirement is that members sign into the mobile app with the same credentials that they use to access the WA site via a browser (i.e. email, password)
The "contacts" API returns the user's email but not the password (which would clearly be a security issue). So the iOS app cannot verify the members credentials itself.
Is there an API that the iOS app can call to verify the members password? If not, do you have any other suggestions on how this type of member sign…
0 votesLatest version of oAuth service allows to authenticate any contact from your contact database. Please follow the instructions here http://help.wildapricot.com/display/DOC/API+V2+authentication#APIV2authentication-UsingWildApricotusercredentials and use scope=auto.
-
Is it correct that users cannot get their membership data via API?
I'm working with a tool called Cognito Forms that allow some fairly complex form functionality. One great feature is the ability to pass values to a form embedded on a Wild Apricot page.
We are currently working on a feature where a member navigates to a member-only page for expense reimbursement. The page loads an embedded form and pre-fills most of the information.
Right now, I am using the API to use the contacts/me call to load name and email, but I need the contact/{contact-ID} to get the address and phone.
After getting the script completed and pre-populating the form…
1 voteHi Andy,
contacts/me endpoint returns short version of contact data. If you need all field values, just add query string parameter includeDetails=true.
Here is an example:
https://api.wildapricot.org/publicview/v1/accounts/183112/contacts/me?includeDetails=true
-
Access registrants who are on the waitlist via API
We need to be able to export the list of registrants who are on the waitlist. If a course (event) is full, we want to be able to pre-register waitlisted people the next time that we offer the course.
Currently we have to copy-and-paste from the full event to the next event, a tedious and error-prone activity.4 votesWe added a parameter includeWaitList, which allows to get waitlisted registrants through API. Each event registration now has a flag “OnWaitlist” to indicate waitlisted registrations.
See detailed description here https://app.swaggerhub.com/apis/WildApricot/wild-apricot_public_api/2.1.0#/Events.EventRegistrations/GetEventRegistrationsList
-
Using API on MS Access 2016
I extended the excel sample API V2 app to develop an attendance system for our club. For a number of reasons, we're working to move off of Excel and onto Access. The sample code from WA runs smoothly on Excel, but not on Access. The sample includes the following (in function GetOAuthToken)
Dim httpClient as IXMLHTTPRequest
Set httpClient = CreateObject("Msxml12.XMLHTTP.3.0")
httpClient.Open "POST", url, False(where url = "https://oauth.wildapricot.org/auth/token")
The client.open returns 'unauthorized'. I cannot find any documentation on the open method of the httpclient object. And I have no idea what extra authorization I need when working in…
1 vote -
"The remote server returned an error: (403) forbidden."
I am using the sample visual studio c# program you have provided (see attachment). The program is failing in trying to access https://api.wildapricot.org/v2. Version2 is failing with a 403 forbidden error message. Any suggestions how I could solve this issue?
1 voteThe root cause was in using the sample for a v1 API.
-
Postman collection
I previously posted about whether anyone had written a Swagger file for WA API that could be used to connct Microsoft PowerApps to WA. New release of PowerApps supports using a Postman collection instead of a Swagger file. Has anyone built a Postman collection for WA API?
2 votesPostman is able to import collections from swagger specification. Our APIs are published on swaggerhub here: https://app.swaggerhub.com/search?type=API&owner=WildApricot
-
API calls to update contacts suddenly failing
We have a Google Apps script that is used to update a custom contact field. This code has been working and unchanged for the past year, and has suddenly lost the ability to update contacts. Other API calls to get contacts, update event registrations, etc. are still working fine, but can't update any contact fields through the API. Attempts to do so result in an HTTP 500 error. We are still able to update contacts through the web interface.
Relevant information pasted after the break.
Error:
[17-09-16 07:31:21:841 CDT] Exception: Request failed for https://api.wildapricot.org/v2/accounts/84576/Contacts/40772038 returned code 500. Truncated server response:…1 voteWe fixed this issue, so it should work now.
Feel free to reopen this topic if the issue remains. -
API Upload Pictures
Hey WA Developers, I'm trying to work through some of the API documentation and I'm hung up on the "Uploading Pictures" documentation.
https://help.wildapricot.com/display/DOC/Pictures+API+V2+call
I've got a Google Script constructed to upload an image from Google Drive to my trial WA site and I can't get it to work! 400 response code. Anybody up for taking a look and pointing out what I am doing wrong? Thanks so much!1 vote -
Contacts/me Returns null
Hi!
Using some of the sample code from the GitHub repo I've created a few custom PHP pages for events on a third party site. I'm trying to make the registration functionality work.
The problem that I'm running into is the Contacts/me API call returns null even with a user logged in. I'm using the format:
{baseAPIaddress}/{version}/Accounts/{accountID}/Contacts/meI am able to run Contact/{ContactID} and get the relevant data back. Do anyone know what might cause this?
Thanks, Jason.
1 voteThe problem was solved.
Note that API key isn’t connected with any contact. So contacts/me will return null if you are not authenticated by login/password. -
api events
I am having trouble adding a new event through the api. I get a 403 error. Here is my google script code if anybody would be so kind as to point out where I have messed up. :) Thanks so much.
https://gist.github.com/portercar/945c29474fece0e208991ac27f724203
1 vote -
Profile last updated field differs in filter from value read in API ?
Hi,
we have a job that queries via the API searching with a filter on "Profile last updated". The query can return no results, it doesn't find any contacts changed since the last query run. However if we just iterate through the contacts and read the Profile last updated field it can be more recent shown in the API results than displayed in the WA web interface. It appears when reading via the API the "last login date" is used as the Profile last updated date if the last login is newer than the last profile update.Summary:
Profile last…1 voteThe date in API and in web interface are taken from the same field in database. I was not able to reproduce error you described. Probably it was an error, which is already fixed.
Please let us know if you encounter any error like this.
-
Setting a Password when creating a new contact/member
Hi,
I need to create a contact through the API through a 3rd party server. I have no problem creating a contact. However, when I set a password and try to login after I have created the contact, I get an error saying that I have the wrong login information.
Secondly, when someone signs up they get an email with a password sent to them. Is this possible as well through the API? When I create a contact through the API I want to be able to send them the password in their email so they can login.
1 vote1. Creating contact
- Newly generated password should be passed in $postFields instead of “12345678”
- Method createWAContact should be modified to use a password
Please see improved version of your code here: https://gist.github.com/DmitriySmirnov/8d65a1417d9ffdfc9efe762fa492bbcc
2. Sending password
Currently you can’t send such email using API, however there is a lot of PHP libraries for sending emails. -
I need to access the "group participation" data for the current user. Can anybody show me how to access the data?
I need to access the "group participation" data for the current user. Can anybody show me how to access this data?
1 voteGroup participation data can be foubd in the fiels with name ‘Group participation’. For example:
var contact = getContactById( 123 )
for( i=0; i<contact.FieldValues.length;i++) {
var record = contact.FieldValues[i];
if( record.FieldName == ‘Group participation’)
var groups = record.Value;
} -
PUT method to update contact is failing
I am trying to update the contact details.
this.data =JSON.parse(data);
var contactId = this.data.Id;
let userurl = 'https://api.wildapricot.org/v2/Accounts/' + accountid + '/Contacts/' +contactId;console.log("efore put call", userDetails); console.log("efore put call stringified", JSON.stringify(userDetails)); let bodyString = JSON.stringify(userDetails); this.http.put(userurl, bodyString, {headers:headers}) .map(res => <User>(res.json())) .subscribe(userAuth => { // we've got back the raw data, now generate the core schedule data // and save the data for later reference this.userData = userAuth; console.log('get user details', userAuth); resolve(this.userData); }, err => { console.log("error", err); }); });
that is my put code.. as your can see I am sending the body text as…
1 vote -
Built-in export/reports data via api
Can we please access the data from the built-in Wild Apricot "export" buttons via the API?
Example: We currently go to Finances > Payments & Refunds > [Export button] > [tick all boxes] > [export as csv], then open the downloaded file and copy/paste into a Google Sheet so we can organise it.
Surely when the Web Interface generates this export it is simply an internal API call... I want to skip the login/generate/download/copy/paste steps and instead pull the same report data straight in to the Google Sheet via the API. Is this possible?
2 votesCurrently you can access payments and refunds using API as described here
https://help.wildapricot.com/display/DOC/Payments+API+V2+call and here https://help.wildapricot.com/display/DOC/Refunds+V2+API+call -
Change the batch interface to support the POST method
I have been trying to call the batch API interface from Google Apps Script. Apps Script correctly realizes that BATCH is not a valid HTTP method and prevents me from submitting the request. There must also be many other HTTP client libraries that prevent this.
The solution is simple - just extend the batch API to also allow a request submitted with the POST method.
1 voteIt was resolved in release 5.9.2
- Don't see your idea?