Skip to main content
Solved

Adding a scope to an access token


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

Best answer by jseumo2

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. 

View original
Did this help you find an answer to your question?

6 replies

ngoknel
Administrator
Forum|alt.badge.img+8
  • Product Manager
  • 47 replies
  • August 17, 2022

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.

 


  • Author
  • Fresh Face
  • 3 replies
  • August 17, 2022

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. 

 

 


aqila
Community Manager
Forum|alt.badge.img+1
  • Community Manager
  • 29 replies
  • August 17, 2022

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


  • Author
  • Fresh Face
  • 3 replies
  • August 17, 2022

@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: 

 


aqila
Community Manager
Forum|alt.badge.img+1
  • Community Manager
  • 29 replies
  • August 19, 2022

Hi @jseumo2,

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


  • Author
  • Fresh Face
  • 3 replies
  • Answer
  • August 22, 2022

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.