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

API V2 "invalid_scope" error

Multiple attempts at setting the "scope" param (contacts_view, events_view, contacts, etc) all return the same error:
{"error":"invalid_scope","error_description":"Scope 'events_view\n' is not available for current client.","error_uri":null}

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

1 vote
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

    EricEric shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Resolved  ·  DmitryDmitry responded  · 

    The reason was a new line character in scope value.

    4 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...
      • EricEric commented  ·   ·  Flag as inappropriate

        FWIW, I figured out the problem. The indication in the error should have been a tip: "Scope 'events_view\n' is not available for current client". The newline was being sent at the end of the POST data, causing the error.

        Interestingly, the API was quite happy with a "grant_type=client_credentials\n" in the POST, but not with the trailing newline in "scope=events_view\n". This made it extra-hard to discover.

      Feedback and Knowledge Base

      Wild Apricot Inc. 144 Front Street West Suite 725, Toronto, Ontario, Canada M5J 2L7