create developer app scopes error - keymanagement service InvalidScopes

Im trying to use the create developer app endpoint using a request body format copied from the api docs.

Scopes is defined as:

"scopes" : [ "scope_a" ]

I get the following error:

{

"code": "keymanagement.service.InvalidScopes",

"message": "Invalid scopes. Scopes must be contained in []", "contexts": []

}

"code": "keymanagement.service.InvalidScopes", "message": "Invalid scopes. Scopes must be contained in []", "contexts": []

9357-scopeserror.png

1 5 344
5 REPLIES 5

Former Community Member
Not applicable

Hello @scott Roberts

I am experiencing the exact same issue. I found this separate topic which seems to imply that scopes (despite the management API documentation) are not assignable at the App level.

It's unfortunate that nobody else could be bothered to respond to your question within the last year. It's also unfortunate if (as the topic suggests) the only way to implement scopes is by applying them to specific products.

Not applicable

The scope in developer app is in the credentials. It's not directly there in the app scope.

Try

{
  "attributes": [],
  "credentials": [
     {
        "apiProducts": [],
        "scopes": ["read_a"]
      }
    ]
  "name" : "test",
  "status": "approved"
}

Former Community Member
Not applicable

Thank you, I'll give that a shot!

Former Community Member
Not applicable

So, this approach permits the request to be submitted, but subsequent calls to the same App show the credentials without any scopes.

The scope will be associated with the credentials. So, you can get that when the api key verification happens.