Solved

Adding a scope to an access token

  • 16 August 2022
  • 6 replies
  • 115 views

Userlevel 1

Hi, 
I need to be able to use the notifications endpoints for the Unity API, but I am not sure where to go to add the correct scope for my testing access token. Can anyone direct me? The token already has access to the following scopes: 

scope": "[\"SkyStatus.Site\",\"SkyStatus.GSM\",\"SkyStatus.Usage\",\"SkyStatus.Reporting\",\"Console.GSM\"]"

Thanks

icon

Best answer by jseumo2 22 August 2022, 16:56

View original

6 replies

Userlevel 3
Badge +8

Hello @jseumo2,

Thanks for posting a question regarding the Unity Event Notifications API, and for being a Webroot Unity API user.  We appreciate any feedback.

Event Notifications can be turned on within the Webroot Console.  Please navigate to Settings > Unity API Access > Select the desired “CLIENT ID” > Click the “Edit” button > Follow on screen instructions.  Please also see below.

Select “Yes” when asked to turn on Event Notifications and complete “Edit” process.

The “Notifications” scope will be added to the selected CLIENT ID.

 

Userlevel 1

Hey @ngoknel,

So I’m pretty positive we did exactly that according to the documentation as well: https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Notifications#notifications 

But I still get 

{
"statusCode": 403,
"requestId": "be3a84f5-57b0-4bf9-97b9-be4db4c3002a",
"error": "insufficient_scope",
"error_description": "Access was denied due to insufficient token scope.",
"AdditionalInformation": {}
}

when I try to access a notifications/subscriptions endpoint. 

 

 

Userlevel 5
Badge +1

Hello @jseumo2 ,

The error response above happens if the notification API has not been enabled as below when creating a new client credential, it has to be selected.

Hope this helps.

Thanks,

Aqil

Userlevel 1

@aqila,

As you can see from the image I posted in my reply, it has indeed been selected and activated for the credential that I am using. 

here is the image again: 

 

Userlevel 5
Badge +1

Hi @jseumo2,

Thanks for your feedback. I have DM’d you to progress the specifics of your case.

Userlevel 1

Hi All, 

my issue was that I didn’t have the Notifications.* scope included in the post body. So it was rejecting my calls to the notifications endpoints. 

Thank you @aqila  for reaching out and helping me solve this issue. I really appreciate your help. 

Reply