If get organization in a solid subdomain, this way works:
curl --request GET
--url 'https://mysubdomain.atlassian.net/rest/servicedeskapi/organization'
--user '[email protected]:<access_token>'
--header 'Accept: application/json'
But this way doesn’t work:
curl --request GET
--url 'https://api.atlassian.com/admin/v1/orgs'
--header 'Authorization: Bearer <access_token>'
--header 'Accept: application/json'
Also this way doesn’t work:
curl --request GET
--url 'https://api.atlassian.com/admin/v1/orgs'
--user '[email protected]:<access_token>'
--header 'Accept: application/json'
The error code is:
{"code":401,"message":"Unauthorized"}
The access token was created on this page:
https://id.atlassian.com/manage-profile/security/api-tokens
Why it doesn’t work?