There are the endpoints which when I try to access gives me the above error. I am testing out if the granular scopes that I have added for the application are working as the previous ones were not. I have created an app and using the Atlassian developer console to get the authorization URL.
https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id=XXXXXXXXXXXXXXXXXXX&scope=read%3Aattachment%3Ajira%20read%3Aissue%3Ajira%20read%3Agroup%3Ajira%20read%3Aboard-scope%3Ajira-software%20read%3Acomment%3Ajira%20read%3Aissue-type%3Ajira%20read%3Aproject.component%3Ajira%20read%3Aproject-role%3Ajira%20read%3Aproject%3Ajira%20read%3Aproject-version%3Ajira%20read%3Asprint%3Ajira-software%20read%3Auser%3Ajira%20read%3Aissue-worklog%3Ajira%20read%3Aapplication-role%3Ajira%20read%3Aaudit-log%3Ajira%20read%3Aboard-scope.admin%3Ajira-software%20read%3Adashboard%3Ajira%20read%3Aepic%3Ajira-software%20read%3Afilter%3Ajira%20read%3Afield%3Ajira%20read%3Aissue.changelog%3Ajira%20read%3Afield.option%3Ajira%20read%3Afield.options%3Ajira%20read%3Aissue-link%3Ajira%20read%3Aissue-link-type%3Ajira%20read%3Apriority%3Ajira%20read%3Aresolution%3Ajira%20read%3Aissue.transition%3Ajira%20read%3Apermission%3Ajira%20read%3Aproject-category%3Ajira%20read%3Aissue-security-level%3Ajira%20read%3Aissue-security-scheme%3Ajira%20read%3Astatus%3Ajira%20read%3Aissue.time-tracking%3Ajira%20read%3Aissue.vote%3Ajira%20read%3Aissue.watcher%3Ajira%20read%3Aworkflow%3Ajira&redirect_uri=https%3A%2F%2Flocalhost%2F&state=${YOUR_USER_BOUND_VALUE}&response_type=code&prompt=consent
using this URL I am able to get the authorization code and in turn able to get the access token with the required scopes, but when I try to access these below endpoints I get the 401 Unauthorized : You are not authenticated Authentication required to perform this operation error. I have admin access to the sandbox which I am using to test these endpoints, and I am using postman to test it.I have set the access token as the bearer token.
/rest/agile/1.0/board/rest/api/2/role/rest/api/2/application-properties/advanced-settings/rest/api/2/applicationrole/rest/api/2/auditing/record/rest/api/2/configuration/rest/agile/1.0/board/{boardId}/epic/rest/api/2/group/rest/api/2/settings/columns/rest/api/2/priority/rest/api/2/resolution/rest/api/2/projectCategory/rest/api/2/issuesecurityschemes/rest/api/2/configuration/timetracking/list/rest/api/2/workflow/rest/api/2/statuscategory/rest/api/2/status
{{protocol}}://{{host}}/{{basePath}}rest/api/2/___________
protocol: httpshost: sandbox.atlassian.netbasePath: I am currently setting this as jira, but it gives me 404, so I have removed this field and have used it in this format
{{protocol}}/{{host}}/rest/api/2/_______
I have used the above request format for the below endpoint and I am able to get responses with 200 OK.
/rest/api/2/issuetype/rest/api/2/project/rest/api/2/dashboard/rest/api/2/filter/favourite/rest/api/2/field/rest/api/2/field/rest/api/2/issueLinkType/rest/api/2/permissions/rest/api/2/project/type
I would really appreciate it if someone can point out what I am missing or if there is a better way to make this work. Thank you for time.
@Navin Karunanithi Welcome to the community!
If you are using the postman and sending the GET/POST request and added the basic authorization then i thing you just need to provide the your email address as a username and password as a token. So can you check without the Bearer once
@Yogesh MudeThank you for your reply. I want to check if the access token generated with updated granular scopes is able to access the objects. Using basic authentication via username and password would not fit my use case.
Okay, Can you check with/without scope token and assuming you are using Berer Token in authorization, if so, then try convering token to base64 encoding and check.
@Yogesh Mude: I tried what you suggested, by having email as the username and the token generated as the password, then performed base64 encoding. But it still return 401 error with Client must be authenticated to access this resource.
I have tried using the developer console to create an app, added scopes and then authorized it to the sandbox for which I have admin permissions. I have added the generated access token as bearer token and also tried it as basic authentication by adding it with email as the username and the token the password, then performed base64 encoding but still facing this 401 issue.
I have also tried creating an API token using https://id.atlassian.com/manage-profile/security/api-tokens selected the JIRA scopes and added required scopes to test it. For this too i have added them as bearer also as the mentioned basic authentication but it was the same.
I have tried it in curl as well. This is the sample curl :
curl --location 'https://companyname-sandbox-180.atlassian.net/rest/api/2/workflow' \--header 'Accept: application/json' \--header 'Authorization: Basic xxxxxxxxxxxxxx' \--header 'Cookie: atlassian.xsrf.token=xxxxxxxxxxxxxxxxxx'
I am getting "You are not authenticated. Authentication required to perform this operation" for api/2/statuscategory and "Client must be authenticated to access this resource" for the above mentioned objects in the post.
@Yogesh MudeI have tried using Basic Auth with email as username and the token and password. Postman itself converts to base64 when using basic authorization.
I have also tried using the token as bearer token. However, I still am not able to access the endpoints.
It looks like you're new here. Sign in or register to get started.