Skip to content

Developers

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

104 results found

  1. Data returned in contacts/me

    Hi,
    using example PHP code and worked out that if we authenticate to the API as a user then we can retrieve the user's ID with the contacts/me call, but it returns limited data about the user. It does not return membership field values. Is there a way, when logged in as a user, to retrieve the users record including datafields?

    Just for context, I'm writing a joomla auth plugin. I want to first authenticate the user (hence using the user credentials) and once authenticated I would like to get some of the data to sync into the Joomla account…

    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

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

    Current version of API provides only limited dataset in /contacts/me requests. If your application needs more information then it can access API using API key. Our Wordpress authentication plugin works exectly this way.

  2. Cannot get access token after successful SSO

    I am able to obtain authorization_code from OAuthLogin, but cannot get access token from oauth.wildapricot.org with it.

    The failure occurs due to CORS although I believe I am making the request from the same origin (SSOfail_CORS.png).

    If I disable CORS, the failure behaves differently. A pop-up is shown asking for username+password (SSOfail_noCORS.png). This pop-up keeps repeating after entering valid credentials, and must eventually be canceled to continue.

    Here is the code that makes access token request:

      $.post(
        "https://oauth.wildapricot.org/auth/token",
        {
          authorization_code: code,
          client_id:          "xxxxxxx",
          client_secret:      "xxxxxxxxxxxxxxxxxxxxxxx",
          redirect_uri:       "https://rbc.wildapricot.org/Schedule",
          scope:              "auto"
        },
        function(data, status){
          alert("Data " + JSON.stringify(data) + "\nStatus: " +
    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

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

    The reason is that you pass client_id and client_secret as a form parameters, but they should be passed in Authorization header.

    API is expected to be used from server code or from standalone application. Currently JS applications are not supported. Nature of JS applications does not allow to keep secret, so any user can extract auth token from JS application. I would recommend to implement all interactions with public API using some server-side app. It can be PHP / python or even google script app.

  3. Sample C# Code With New APIKEY

        private const string AllScopes = "general_info contacts finances events event_registrations account membership_levels settings";
    

    var authData = string.Format("granttype={0}&scope={1}", "clientcredentials",AllScopes);

            var response = System.Net.WebRequest.Create(Common.OAuthServiceUrl)
                .SetBasicAuth("APIKEY", "........YOUR API KEY HERE......")
                .SetData(authData)
                .GetResponse();
    

    Extension Methods:

        public static WebRequest SetData(this WebRequest request, string data, string contentType = MimeFormUrlEncoded, string method = "POST")
        {
            request.Method = method;
            request.ContentType = contentType;
            byte[] sentData = Encoding.UTF8.GetBytes(data);
    
            request.ContentLength = sentData.Length;
            Stream sendStream = request.GetRequestStream();
            sendStream.Write(sentData, 0, sentData.Length);
            sendStream.Close();
    
            return request;
        }
    
        public static WebRequest SetBasicAuth(this WebRequest request, string userName, string password)
        {
            var credentials = string.Format("{0}:{1}", userName, password);
            var encoded = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(credentials));
            request.Headers.Add("Authorization", "Basic " + encoded);
    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 →
  4. User Permissions

    I'm working with your API and I've noticed that individual members only have permission to make requests for their own contact information and the account information. I was wondering:

    Is there a way to return the users ID who has logged in rather than the ID of our WA account?

    How to we assign more permissions globally as we'd like our members to be able to view and register for events through an app we're building.

    Thanks so much.

    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

    1. If you access API using contact’s credentials, then you can use /v2/accounts/XXX/contacts/me request to get current user’s information, including his ID.

    2. There is no way to give more permissions to contacts/members. However, if you are building web application, which runs in trusted environment, you can make some API requests using API key rather than contact credentials. When you access API with API key, then you have full permissions to events and event registrations.

  5. Joomla authentication plugin?

    Hi,
    wondering if anyone has used the new signon stuff in the API to create a Joomla authentication module? I've written a Joomla Authentication module to use a third party (database) source for users and would like to change update it to use WildApricot as the backend for authentication. Thinking about paying a developer to update the plugin but before doing so wondered if anyone else has done this?

    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. Please help with API version 1 to API version 2

    I am part of a voluntary organization and we received an e-mail about updating to API version 2 and same changes that needed to be made. We are all in way over our head and I just took over the website management this week. I would appreciate any and all help.

    We don't even know if we are using API. I will do anything I need to do but I really need help. Again, I am not paid this is for a completely voluntary organization.

    Thanks,

    Bradley Bearden

    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

    If you know nothing about API, then most probably you don’t use it and can forget about that e-mail.

    However if you, or someone of your collegues developed custom software to automate your work, then you should ask a developer to update this software.

  7. Database update via API returns "State":"Waiting","InitialQuery"

    I use a cron job to hit the API a few times a day, sometimes I get a blank result and this is what is returned:

    Any idea why this happens ?? I am not requesting the API every second. It is literally twice a day ??

    {"ResultId":XXX"","ResultUrl":"https:\/\/api.wildapricot.org\/v1\/accounts\XXX\/Contacts\/?resultId=XXX","Requested":"2015-07-26T22:56:05.057","State":"Waiting","InitialQuery":{"ObjectType":"Contact","FilterExpression":null,"SelectExpression":null}}

    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

    4 comments  ·  API  ·  Admin →
  8. 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 →
    Resolved  ·  Team Mobile responded

    We failed to reproduce this problem, so I mark the problem as resolved. Feel free to reopen if you encounter the problem again.

  9. API V2 authorization error using APIKEY

    As far as I can tell, APIKEY authorization according to:
    http://help.wildapricot.com/display/DOC/API+V2+authentication
    is broken.

    This example:

    POST /auth/token HTTP/1.1
    Host: oauth.wildapricot.org
    Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Content-Type: application/x-www-form-urlencoded

    granttype=clientcredentials&scope=contacts finances events

    simply doesn't work, always returning a "scope xxxx is not available for current client" for every scope I've tried (from the table on the same page).

    Is this just completely broken, or something is missing. I note that there is no place in the API for the "application name". I also note that I don't get an "authorization error", as I would get if I use an incorrect base64-encoded API…

    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

  10. API V2 "invalid_scope" error

    Multiple attempts at setting the "scope" param (contactsview, eventsview, contacts, etc) all return the same error:
    {"error":"invalidscope","errordescription":"Scope 'eventsview\n' is not available for current client.","erroruri":null}

    My client was created with "read only" access. Shouldn't this work?

    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

    4 comments  ·  API  ·  Admin →
  11. API V2 help creating or updating fields

    I am evaluating Wild Apricot for a small non-profit. We are all volunteers who will be administering it, so I am investigating using the API to automate our workflow due to the fact that WA does not create a Contact for Guest registrations.

    My question is related to the Create Contact or Update Contact operations. I can create a contact with the FirstName, LastName and Email fields and I can update those fields. However, I have been unsuccessful adding or creating additional fields, even the Phone built in field.

    Can anyone help by sending me an example of the syntax…

    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

    3 comments  ·  API  ·  Admin →
  12. What will you do with the new API?

    I'm excited for the API that will be coming out this month (according to this forum: http://forums.wildapricot.com/forums/308920-archive/suggestions/8831320-api-to-read-contact-member-records-2469 )

    I see that there are a lot of people interested in the API and I was curious what others will be using it for? I will be using it to integrate Google Maps but perhaps there are some other cool things I can set up that I haven't thought of.

    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

    21 comments  ·  API  ·  Admin →
  13. 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 →
  14. API changes in 5.4 (action may be required before July 6th)

    In Version 5.4, which was just released on June 15th, Wild Apricot has made changes to the authentication process https://help.wildapricot.com/display/DOC/API+V2+authentication for its API. We have moved from account-based authentication to the more secure application-based authorization. Instead of generating a single API key that provides complete access to your entire Wild Apricot account, you authorize individual applications, each of which are assigned separate credentials. If you've previously generated an API key for your account – prior to the 5.4 release – it will automatically be converted to an authorized application called Legacy API key.
    If you are currently using an API…

    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  ·  0 comments  ·  API  ·  Admin →
  15. API V2 authentication and sample routines in Python

    Hi,

    I'm trying to integrate my Wild Apricot database into a standing Python program. If somebody has already written the V2 API authentication and some routines in Python, can they share so I can leverage?

    Thanks in advance.

    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

    3 comments  ·  API  ·  Admin →
  16. API: Get list of contacts by saved search

    Wanting to get some feedback if I am doing this correctly or there is a better way!

    Goal: I have 13 SavedSearches and I want to create 13 separate Google SS (using Google Script) with the details of members (some custom fields I have created as well) returned by each SavedSearch.

    Step 1: I use the api SavedSearch request to return the contactIds.

    Step 2: Iterate through the returned list and make an api call to contacts using the contactId.

    Here is the problem I am encountering. The limit on individual contact calls is 60 / minute. All my searches…

    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

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

    The solution is to call
    GET …/contacts?$filter=id in [1,2,34,85,…….] and instead of numbers add the ids you received from saved search call results (it returns them too).

  17. Contacts API v2 $select doesn't provide MembershipLevel

    I found that when using $select on the contacts API call in V2, the MembershipLevel field is not available. It is available however if all fields are returned by not using $select

    Is this by design, or an oversight?

    I am using the sample PHP code.

    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  ·  1 comment  ·  API  ·  Admin →
  18. Getting Support for the WA V2 API?

    Hi - looking through recent posts in the forum regarding usage of the WA API V2 I get the impression that the API is basically unsupported by WA. e.g. two API issues I posted some days ago remain unanswered and a recent API V2 question from another user (GeePawHill) also remains without any replies.

    So a basic question - do WA staff support the API through this forum? If not can anyone at WA advise what other avenues are available in order to get support for the API? e.g. should we be submitting API issues via the support channel? (email)…

    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 →
    Resolved  ·  Dmitry Smirnov responded

    The Developers forum is a place where WA developers or other users can help you with API. We try to help you with API issues as much as possible, however the support does not include debugging code of client applications.

  19. API - HTTP POST Error 500, an internal error has occured

    Hi - I've spent hours trying to figure why the POST below (in Swift) fails. Status code is HTTP 500 which according to the doc means "Wild Apricot's server has encountered an error and cannot fulfill the request." API Key and authentication are all good since GET requests to the same API work fine.

    The event is very simple defined to have only fields first and last name and email. The event is public. I've triple checked all the Id's - event, contact, reg type id etc.

    Any ideas much appreciated..

    Thanks
    David

    Post URL is https://api.wildapricot.org/v2/accounts/{acctid}/EventRegistrations/

    Post Body is…

    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  ·  1 comment  ·  API  ·  Admin →
  20. 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 →
  • Don't see your idea?

Developers

Categories

Feedback and Knowledge Base