I know that it was discussed before, but I don't see any solution for this error :
{"message":"Client must be authenticated to access this resource.","status-code":401}% I'm not working with UI ( User Interface) and I am working from backend, I want to authenticate myself (my users) to be able to run some API call.
I want to run this code :
curl --request GET \<br>--url 'https://MYSITE.atlassian.net/rest/api/3/applicationrole' \<br>--header 'Accept: application/json'
or in python :
import requests<br>import json<br>url = "https://MYSITE.atlassian.net/rest/api/3/applicationrole"<br>headers = {<br>"Accept": "application/json"<br>}<br>response = requests.request(<br>"GET",<br>url,<br>headers=headers<br>)<br>print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
But I'm getting this error :
{"message":"Client must be authenticated to access this resource.","status-code":401}%
the question is how to authenticate it before or at same time (in same line) ?