When i try to get the user by passing the access token in header (Authorization : Bearer ***********) it shows 403 Forbidden error. ("error": "Failed to parse Connect")
How do i get the user?
Hey there,
I'm going to make a couple assumptions:
It's a good idea to check and make sure everything is in order by running a call with your username, Jira Cloud URL, and API token. This is easy with cURL and we provide an example call with cURL's -u option handling the authentication:
curl -D- \ -u fred@your-domain.atlassian.net:freds_api_token \ -X GET \ -H "Content-Type: application/json" \ https://your-domain.atlassian.net/rest/api/2/issue/createmeta
Assuming that works and you want to proceed with passing that in to a header yourself, you need to base64 encode what is being added to the header. The value is a combination of your email address and the API token (the token itself is not enough). An example:
fred@acme.com:F4981KJN391NMXZP
encoded, this will be the value to put in the header:
ZnJlZEBhY21lLmNvbTpGNDk4MUtKTjM5MU5NWFpQ
Hope that helps!
Daniel | Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.