Solved

Unity API Scope

  • 6 April 2022
  • 3 replies
  • 66 views

Userlevel 1

I am trying to suspend/deactivate sites and keep getting a scope error.

I have tried scopes like:

Console.GSM
Console.*
*

But I continue to get scope errors for these endpoints. What must I do to acquire the correct scope?

https://unityapi.webrootcloudav.com/service/api/console/gsm/{gsmKey}/sites/{siteId}/deactivate

{
"statusCode":403,
"requestId":"3c329835-981d-495e-875f-50201c49752",
"error":"insufficient_scope",
"error_description":"Access was denied due to insufficient token scope.",
"AdditionalInformation":{}
}

 

I can change things in the site without issue but cant suspend/deactivate the site.

icon

Best answer by shandley 7 April 2022, 12:42

View original

3 replies

Userlevel 2

Hi @ctaylor 

The scopes look to be appropriate for what you’re trying to do. 

Can you double check that you’re using 

/service/api/console/gsm/{gsmKey}/sites/{siteId}/deactivate

and not 

/service/api/console/access/gsm/{gsmKey}/sites/{siteId}/deactivate

 

 

Userlevel 1

Easy enough, thank you for the extra set of eyes!

That is exactly what it was. Reviewing some of my other calls it looks like `access` snuck in there as well.
Updated my modules calls with the correct URL and all is good.

Userlevel 1

Thanks module updated.
https://github.com/christaylorcodes/WebrootUnity

Reply