Home

Download this help site
(PDF 82MB)

Download

Authenticating API access from a Wild Apricot site page

Icon

Wild Apricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support via email or through our Developers forum.

Using Version 2 of Wild Apricot's API, you can embed JavaScript code in your Wild Apricot site pages that uses API calls to retrieve, display, and update Wild Apricot database information. Within each API call, you must include authorization information that verifies your account and prevents others from accessing your data. Specifically, you must include the client ID that is generated when you authorize your application.

For information on authenticating from a 3rd-party server or application, see Authenticating API access from a 3rd-party server or application.

Authorizing your application

Even though JavaScript within a site page does not constitute a separate application, you must authorize an application to generate the client ID required to verify your account and prevent unauthorized access to your Wild Apricot data.

To authorize an application for access to your Wild Apricot account, follow these steps:

  1. Hover over the Settings menu and select the Security option.
  2. Within the Security settings screen, select the Authorized applications option.


     
  3. Within the Application authorization screen, click the User authorization option then click the Continue button.


     
  4. From the Application details screen, copy the Client ID   value. This is the value you must pass within your API calls.
  5. Click the Save button to save your changes. 

Accessing the API

An account-specific URL is used to access Wild Apricot's API from Wild Apricot site pages: 

where your_account_url is your Wild Apricot domain name.

When accessing the account-specific URL using JavaScript, the protocol should match the protocol currently being used by the browser, so the best choice is  to use relative URLs in the API call. 

For example, instead of:

you would use:

Passing authorization information

Each API call made from within a Wild Apricot site page must include the client ID value that is generated when you authorize your application (see above). The authorization information verifies your account and prevents others from accessing your data. 

Within your JavaScript, the client ID should be passed in the HTTP header, using the following format:

For example, within jQuery code, the call might appear as follows:

Access to Wild Apricot data will be limited by the access permissions of the currently authenticated user. Consequently, the API cannot be accessed within public pages that do not require user authentication.

Icon

All Wild Apricot API calls must also include the account number – 58293 in the above examples – that appears on the Account and billing screen and is returned by the Accounts API call.


On this page:  

See also:

  • No labels