Go to All Forums

oauth not working for some specific api.

Hello,

I am trying to access data using oauth2  but some api is returning 

{"error_code":1121,"message":"OAuth Scope associated to the OAuth Access Token is disallowed."} 

where some other api such as (www.site24x7.com/api/monitors/XXX)returning data
with same api credentials oauth2.
I am using all scope also.

Site24x7.Account.Read,Site24x7.Account.Create,Site24x7.Account.Update,Site24x7.Account.Delete,Site24x7.Account.All,Site24x7.Admin.Read,Site24x7.Admin.Create,Site24x7.Admin.Update,Site24x7.Admin.Delete,Site24x7.Admin.All,Site24x7.Reports.Read,Site24x7.Reports.Create,Site24x7.Reports.Update,Site24x7.Reports.Delete,Site24x7.Reports.All,Site24x7.Operations.Read,Site24x7.Operations.Create,Site24x7.Operations.Update,Site24x7.Operations.Delete,Site24x7.Operations.All,Site24x7.Msp.Read,Site24x7.Msp.Create,Site24x7.Msp.Update,Site24x7.Msp.Delete,Site24x7.Msp.All,Site24x7.Bu.Read,Site24x7.Bu.Create,Site24x7.Bu.Update,Site24x7.Bu.Delete,Site24x7.Bu.All
Like (2) Reply
Replies (1)

Re: oauth not working for some specific api.

Hi,

You can check the scope of the api in the API Doc itself

For example,

https://www.site24x7.com/help/api/#monitors

oauthscope  for POST /monitors is Site24x7.Admin.Create.

If you could not access the api, even after generating the token with the mentioned oauthscope, let us know the api end point.

One more tip, if you are using "All" option for a scope, for example Site24x7.Admin.All, then you don't need to specify the individual CRUD options for the scope, such as Site24x7.Admin.Create, Site24x7.Admin.Read etc.

Thillai.

 

Like (0) Reply

Was this post helpful?