Skip to content

Developers

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

99 results found

  1. Accessing member ID from a 3rd party website

    Hi

    Not sure if this is possible

    I am designing a 3rd party website and I would like to offer our WA members the ability to login using the WA SSO and access a restricted section within the 3rd party. Although I can achieve this I would like WA to tell me who the member who logged in was (e.g. by telling me the memberID)

    Is there a way to do this?

    So far I do the following based http://help.wildapricot.com/display/DOC/Single+sign-on+service
    1. I get the SSO working and WA returns state and code

    1. I then send $data["granttype"]="authorizationcode"; $data["authorizationcode"]=$
    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Bug in example PHP application

    Hi,
    if you're using the provided example PHP application there's a small bug that can impact authentication.

    In function getAuthTokenByAdminCredentials

    CHANGE:

    $data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', $login, $password, $this->tokenScope);

    TO:

    $data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', urlencode($login), urlencode($password), urlencode($this->tokenScope));

    We had a user unable to login and found that a reserved character in the password meant the string was being incorrectly parsed. urlencode() escapes special characters so they are passed through correctly.

    Regards,
    Russell.

    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  ·  API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. Web link with embedded user data

    We are migrating our members to WA and I have a big issue. Our members are granted access to an external database as part of their membership to search legal information online. Members log into our portal and click on a link that has their own AccountID, First Name, Last Name and email address embedded. Is there a way to accomplish this in WA?

    Here is an example of the code we use now on our existing ASP site to generate the individual links:

    using System;
    using System.Web.UI.WebControls;
    public partial class membersonlysomedatabase : System.Web.UI.Page
    {
    protected string endurl;
    protected

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Resolved  ·  Dmitry Smirnov responded

    At the end to January we are launching a feature, which allows JS code to access public API. You will be able to get from API information about current user and then build a link.

    Here is

  4. I would like to be able to create a payment without creating an invoice: Just "this contact paid this amount on this date".

    I would like to be able to create a payment without creating an invoice or associating with an event: Just "this contact paid this amount on this date".

    I believe that can be done from the WA web site, but I have batch payments already made via an external (private) system, and I want to upload them into WildApricot.

    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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. API2 Export Invoices to Excel through VBA

    I would like to export our invoices to Excel trough API, as I need country, TAX info, deleted invoices to do a proper administration.

    Can someone send me an example how to connect to WA through VBA using API v2?

    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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. PHP Code - Creating a New Payment for Specific Invoice (API V2)

    I want to create a new payment for specific invoice by using PHP client app.

    Anybody have done PHP client through Wild Apricot API v2. Please share if you have done any PHP code sample which shows Creating a New Payment for Specific Invoice, it will be great 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

    3 comments  ·  API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. POS

    http://www.revenuquebec.ca/en/entreprises/obligationsparticulieres/restauration/mev/default.aspx

    We have to install an automatic tax recorder for revenue quebec since we include alcohol sales at our events.

    Do you know if WildApricot would be able to submit taxes directly to the recorder, have you seen any successful pos (cash register) solutions implemented with wild apricot through the API?

    Thank You

    Carson

    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  ·  API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Resolved  ·  Dmitry Smirnov responded

    WildApricot is not able to submit taxes information to the recorder. And I don’t know about POS solution, which uses Wild Apricot.

  9. oAuth work with Discourse SSO

    I'm trying to understand if Wild Apricot's SSO implementation will work out of the box with Discourse's oAuth SSO implementation, or if I need to develop a plugin for Discourse to authenticate with WA.

    Discourse, a discussion platform, provides a built-in oAuth SSO client. There are screenshots of the configuration here - https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045

    On Discourse, for the SSO URL, I have put in what I believe is the correct URL for the authorized application that I have made in our WA account:

    https://abea.bike/sys/login/OAuthLogin?client_id=<WA CLIENT ID>&redirecturi=http%3A%2F%2Fdiscourse.cyclingsavvy.bike%2F&scope=contactsme&responsetype=authorizationcode&claimedaccountid=<WA ACCOUNT ID>

    Where <WA CLIENT ID> is configured…

    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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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.

  11. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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.

  12. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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.

  14. 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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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.

  16. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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.

  18. Single Sign On server error

    Trying to implement SSO, but just getting 'an error has ocurred'

    URL is https://melbournerebels.wildapricot.org/sys/login/OAuthLogin?client_id=4wq28ex9ox&redirect_uri=http%3A%2F%2Flocalhost%3A3000&scope=contacts_me

    The redirect_uri has been added to the whitelist, and the error telling me to contact myself isn't helping much :)

    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

    5 comments  ·  API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Resolved  ·  Dmitry Smirnov responded

    The request should contain following query string parameters:
    required: client_id, redirect_uri, scope, response_type, claimed_account_id
    optional: state.

  19. 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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  • Don't see your idea?

Developers

Categories

Feedback and Knowledge Base