Go to All Forums

"error_code": 1100 "message": "You are not authorized to perform this operation

I saw several posting non of them answer how to resolve below error.

curl --location --request GET 'www.site24x7.com/api/monitors' \
--header 'Accept: application/json; version=2.0' \
--header 'Authorization: Zoho-oauthtoken 1000.dccxxxxxxx \
--header 'Cookie: _zcsr_tmp=<deleted>-8a24-49f8-8834-fd2249e21176; aeefa57a7c=38a<deleted>ff4ef020ae5; s247cname=1ffe04c9-8a24-49f8-8834-<deleted>; zaaid=<zaaid>'
 
{
    "error_code": 1100,
    "message": "You are not authorized to perform this operation"
}
 
scope 
Site24x7.Account.Read,Site24x7.Admin.Read,Site24x7.Reports.Read,Site24x7.Operations.Read,Site24x7.Reports.ALL
 
 
No idea what is extra setting with site 24*7 required get the results.Even scope and api are not clear enough to understand which scope can be used for specific api. 
 
 
Like (3) Reply
Replies (3)

Hi,

We tried at our end and we could get the results for a 'Business Unit' account monitors. This is allowed under admin scope. It can be accessed using 'Site24x7.Admin.Read' scope.
From the logs we were able to see BU portal admin account zaaid is passed in your request. This is the reason for 'unauthorized' error message. Please change and send the particular business unit account zaaid to get it's monitors. This also can happen when the user is not part of that particular business unit account.
Refer our help doc for more, https://www.site24x7.com/help/api/#business-units-api

If you are still facing this, Please write to us at support@site24x7.com with details to analyze further.

Like (0) Reply

To brief ,

There are two BU as 'test' complete superadmin rights and 'GC' readonly rights .

Is that the case ,that I member of two Business units only with readonly rights and other one superadmin?.

How make token or api to understand my api call are from BU test .

I created some monitor in test BU there but using api to retrieve the monitors details are failing with above errror.

I tried to retrieve the zaaaid id

curl --location --request GET 'www.site24x7.com/api/short/bu/business_units' \
--header 'Authorization: Zoho-oauthtoken 1000.2c95bbca250531066a54ca262366690f.0b6b3ebe06f1c2b42fccxxxxx' \
 
{
    "error_code": 1121,
    "message": "OAuth Scope associated to the OAuth Access Token is disallowed."
}
 
Two BAU units are there one is test , where I got complete rights like superadmin .But still  unable to get api results .
I also send in detail email site 24*7 but no solution . My guess there needs extra previalge or setting required unable to get help.
 
For more information
 
via logged in 
www.site24x7.com/api/short/bu/business_units
 
{
  "0": {
    "zaaid": "4843402648",
    "user_id": "140954000000025001",
    "name": "GlobalCollect"
  },
  "1": {
    "zaaid": "7894646919",
    "user_id": "452540000000025001",
    "name": "Test area"
  }
}
Like (0) Reply

Hi,

To access, add, edit, delete Business Units related data you need to use below scopes while generation code for OAuth Token.
Scope Types: Site24x7.Bu.Read, Site24x7.Bu.Create, Site24x7.Bu.Update, Site24x7.Bu.Delete, Site24x7.Bu.All

Refer our help doc for more, https://www.site24x7.com/help/api/#authentication

If you are still facing this, Please write to us at support@site24x7.com with details to analyze further.

Like (0) Reply

Was this post helpful?