Skip to content

Developers

Mostly about Wild Apricot API. Feel free to share examples of your code!

105 results found

  1. GET /accounts/{accountId}/events

    The swagger docs do not really show how to add the parameters to the HTTP Get request (e.g., $filter). For example, how do I format the request to get all events that have the substring "XYZ" in a Tags field?
    Also what is the syntax of the "TextIndex, Supported operations: substringof." parameter? You have all these good parameters in the Swagger site, but no real examples of how to use the syntax. Are we supposed to guess? Help me out here please. Thanks.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  API  ·  Admin →
  2. Swaggerhub returns 403 Forbidden on all requests to API

    Real simple: Using Swaggerhub to play with the API. I give it a valid API key, it is able to login/authenticate successfully, but the only function returning code 200 OK is default (/) ... when I try the /accounts function or any other function I get 403. Tried 2 different API keys..... with both read-only and admin level access but No matter what I do I get a 403 trying to test the API using the swaggerhub UI

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  API  ·  Admin →
    Resolved  ·  Dmitry Smirnov responded

    That typically occures if you don’t check “Auto” checkbox in the scopes list (swaggerhub does not allow to check it by default).

    So when oAuth service gets your response it creates oAuth token with almost no permissions. Technically it is totally valid situation, but such token is almost useless.

    So the solution is to check “Auto” checkbox in the list of scopes.

  3. getting an oath token using curl

    I am attempting to write a tiny app to download my club's calendar from wild apricot. I plan to write this in python 3, triggered by cron. The first step is to get an oauth token. As a test I tried the following curl command but I receive a 401/unauthorized error. Please note that XXXXX is not my real application ID :-)

    I tried variations, and also some similar code in python with the same result.

    Any hints?

    curl -v -H 'Authorization: Basic BASE64ENCODED("XXXXX")' -H 'Content-Type: application/json' -H 'Transfer-Encoding: chunked' -d '{"granttype":"client_credentials", "scope":"auto"}' https://oauth.wildapricot.org/auth/token

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  How to  ·  Admin →
    Resolved  ·  Dmitry Smirnov responded

    Here is an example

    1 Build your Authorization header.
    – Assume you API key is b8gxv-njhci-XXXXXXXXXXXX-50
    – encode the line “APIKEY:b8gxv-njhci-XXXXXXXXXXXX-50”, you will get
    “QVBJS0VZOmI4Z3h2LW5qaGNpLVhYWFhYWFhYWFhYWC01MA==”

    2 use this value to make a call
    curl -X POST \
    https://oauth.wildapricot.org/auth/token \
    -H ‘Authorization: Basic QVBJS0VZOmI4Z3h2LW5qaGNpLVhYWFhYWFhYWFhYWC01MA==’ \
    -H ‘Content-Type: application/x-www-form-urlencoded’ \
    -d ‘scope=auto&grant_type=client_credentials’

    ==
    I recommend to use POSTMAN before writing any code.

  4. I have successfully integrated the WA API into Integromat

    Integromat.com is like Zapier or IFTT but a bit more powerful AND easy to use. I'm added an authorization Connector and two modules for retrieving and filtering Contacts. Using their Slack integration I can now ask for Integromat to calculate a Membership Report and report back to Slack. Next up is a "new member" notification.

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  API  ·  Admin →
  5. API endpoint for allowing users to cancel registrations

    The new feature added today to allow users to cancel their own registrations is a good start, but we need to be able to set it through the API for it to really be useful. Is there a plan to add this in the near future?

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  API  ·  Admin →
  6. Swagger

    Has anyone built an OpenAPI (Swagger) file for connecting to WA APIs? I'm trying to make a sign-in kiosk with Microsoft PowerApps and it connects through a JSON OpenAPI definition.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  API  ·  Admin →
  7. API with non-administrative permissions

    Original title: Cannot access API from within site pages if not Administrator.

    Hi,

    I have written JavaScript/HTML in a WildApricot site page to display events as a compact list in a table.

    If I login to an administrator account it all works fine, if I login to a non administrator account I get error 403 returned from a get Events API call.....

    "Failed to load resource: the server responded with a status of 403 (Current token does not provide access to scope 'events_view'.)"

    Code snippet is:
    <script>

    generateTable();

    function generateTable()
    {
    var EventsList = getDataFromApi("https://xxxxx.wildapricot.org/sys/api/v2/accounts/xxxxxx/Events?$sort=StartDate asc&$filter=Tags in [training,cruising,racing,racing_crew] AND…

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    17 comments  ·  API  ·  Admin →
  8. fieldvalues contact api

    I have an interesting issue you can help me with. I am using the Contacts API and calling it from a Javascript call using the WA API wrapper for jQuery. I got this code from the WA developer forum and loaded it into the files section to call locally from the WA install (rather than from the original location).

    http://iarpreiki.org/resources/js/waPublicApi.js

    I am using the API to create a URL that I will pass to an external SaaS system, so I need to collect various contact/membership field data.

    The testing page is at

    http://iarpreiki.org/Print-Your-Membership-Certificate -- the top HTML widget is where…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    Resolved  ·  4 comments  ·  API  ·  Admin →
  9. Event Registration is not enabled after creating Event via API

    Hi,

    I have creates a Google script to upload event from a Google spreadsheet.

    I create the event with "RegistrationEnabled": false
    Create the RegistrationTypes for the event.
    Then I enable registrations for any membership level....
    {
    "Id": EventId,
    "RegistrationEnabled": true,
    "Details": {
    "AccessControl": {
    "AccessLevel": "Restricted",
    "AvailableForAnyLevel": true,

    }
    }

    When I go to the admin pages of the website the event is not enabled, access is shown as for Admin users only, however the fields in the form are correct.
    I have to press "Save" on the form and then the event registrations are enabled.
    I have tried all…

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  API  ·  Admin →
  10. 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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    Resolved  ·  3 comments  ·  API  ·  Admin →
  11. 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 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  API  ·  Admin →
  12. Javascript access to Contact/Member/Event data

    I would love to have data available to JavaScript that can be used to access other contact, membership, or event data that may not be available on a page or widget.

    For instance, I have a case where I need to display links based on whether they belong to a certain membership group or membership level.

    There is some 'BONAPAGE' global variables that can be accessed for system or page view status but nothing for the record of the current screen you may be viewing.

    It would be great if there was a global object(s) available that contained the current…

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    Resolved  ·  Dmitry Smirnov responded

    Public API is now available for javascript access by path http://your_account.wildapricot.org/sys/api/….

    This means that:

    • AJAX requests to API is in the same domain
      *JS application is able to access API without token
    • AJAX requests directed to the same domain as
    • JS access API with the same permissions as currently logged in user.

    Please read more on help site:
    http://help.wildapricot.com/display/DOC/Authenticating+API+access+from+a+Wild+Apricot+site+page

  13. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  API  ·  Admin →
  14. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    14 comments  ·  API  ·  Admin →
  15. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  API  ·  Admin →
  16. 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 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  API  ·  Admin →
  17. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  API  ·  Admin →
  18. OAUTH - Not getting back authorization token

    Perhaps someone in this forum can help answer this question. There aren't any OAuth exampels for PHP.

    My code is failing on the last ajax call to the OAuth API. I am getting a NULL response from Wild Apricot.

    Perhap someone can let me know what is wrong withthis code:

        $credentials = '[client_id]:[secret]';
    
    //extract data from the post
    //set POST variables
    $url = 'http://oauth.wildapricot.org/auth/token';
    $fields = array(
        'grant_type' => "authorization_code",
        'code' => CCGetParam("code",0),
        'client_id' => '[client_id]',
        'redirect_uri' => "https://[domain.com]/login2.php",
        'scope' => 'contacts_me'
    );
    
    //url-ify the data for the POST
    foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
    
    $fields_string = rtrim($fields_string,
    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    Resolved  ·  1 comment  ·  Admin →
  19. Need to redirect OLD WA page address to NEW WA page address

    I used to make an index.html file with a meta redirect tag but this doesn't happen with WA according to Tech Support.

    We originally had a WA site that was modified and the new site has the same pages with different URLs. Our fear is that, for instance, someone may have bookmarked the OLD site's page, and when clicked on brings them to the wrong page.

    Help?

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  How to  ·  Admin →
  20. 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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    Resolved  ·  3 comments  ·  API  ·  Admin →
  • Don't see your idea?

Developers

Categories

Feedback and Knowledge Base