How can we make it easier for you to develop on top of Wild Apricot?

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 StartDate ge 2017-01-01");

The API documentation here
https://help.wildapricot.com/display/DOC/Authenticating+API+access+from+a+Wild+Apricot+site+page
Says
"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."

The page in question is not a public page and the user is logged in (but not as an administrator), why are these API calls resulting in Error 403?

Thanks

3 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    anon shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    We are still working on “API for members”, however we already silently published beta version of it.

    While building this API we tried to keep all important information in swagger format.
    Help pages are not ready yet, so the only source of information is swagger spec. You can find swagger file here:
    https://api.wildapricot.org/ui/swagger/publicAccess

    In order to play with API you could use swagger UI located here: https://api.wildapricot.org/content/swagger/?url=/ui/swagger/publicAccess or import swagger file into POSTMAN

    Since the “API for members” is still in beta, Wild Apricot does not provide any kind of support for it (really, our support team is not ready for such questions yet). However development team carefully monitor this forum. If you have any questions regarding this API, please post your questions in this forum thread or as separate topic.

    12 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base