Hi All,
I have set up a 3lo app. Provided app with necessary scopes to work with conflunce apis. When I fetch accessible-resources for an access token I obtained following authorization code oauth flow( as per documentation https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/#distributing-your-oauth-2-0--3lo--apps), I get
{
"id": "id-7e7e-4d7a-8d74-",
"url": "mysite url",
"name": "mysitename",
"scopes": [
"manage:confluence-configuration",
"read:confluence-content.all",
"read:confluence-content.permission",
"read:confluence-content.summary",
"read:confluence-groups",
"read:confluence-props",
"read:confluence-space.summary",
"read:confluence-user",
"readonly:content.attachment:confluence",
"search:confluence",
"write:confluence-content",
"write:confluence-file",
"write:confluence-groups",
"write:confluence-props",
"write:confluence-space"
],
"avatarUrl": "avatar image url"
}
but when I try to fetch my site resources using cloud id of my app, using the same token (as a bearer token) I always get
{
"code": 401,
"message": "Unauthorized"
}
Steps I have executed:
1.created a 3lo app in developer console.
2.granted app with required scopes.
3.obtained an access token by following authorization code flow, for my app’s authorization url
4. verified accessible resources for the token I have obtained. (using /oauth/token/accessible-resources api)
5. use the same token used in above step to fetch resources from my site,
/ex/confluence/{my-site-id}/wiki/api/v2/spaces/{my-space-id}
I have retrieved space ids for spaces in my site using basic authorization (using username, api token as basic auth headers), and all confluence apis work fine when I use basic authorization.
Can somebody please help me with resolving this issue of getting 401 when trying to used oauth access token to connect with confluence apis? Any thoughts?