Hello,
I have read many topics on how to connect but either the doc they referred to doesn't exists or Jira evolved in such way that the solution doesn't work anymore.
So maybe someone can help me on :
I'm trying to connect for one week to the Rest API of Jira. As I have a Google G-Suite account, I wasn't able to found how to create a "jira password" for mu user name so I created an API-Token.
I've generated a API-Token and followed the example given in the documentation here :
https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/\\
So i've tried this :
curl -D- -X GET -H "Authorization: Basic XXXXXXX" -H "Content-Type: application/json" "https://oniryx.atlassian.net/rest/api/2/issue/createmeta"
where XXXXXXX rplace the base64 encoding of laurent.jadoul;[API-Token Value].
It always ends with 401.
Can you please advice ?
Thanks in advance,
Laurent
Hi Laurent,
Can you try the following format:
user@example.com:API-Token Value
(Please notice the @example.com and the colon is used instead of a semicolon)
Example for encoding (requires openssl on your machine):
Command:
echo 'user@email:API-Token Value' | openssl base64
Output:
dXNlckBlbWFpbDpBUEktVG9rZW4gVmFsdWUK
Example request:
Command:
curl -D- -X GET -H "Authorization: Basic dXNlckBlbWFpbDpBUEktVG9rZW4gVmFsdWUK" -H "Content-Type: application/json" "https://<domain>.net/rest/api/2/issue/createmeta"
Hope this helps!
Paulo Ferreira
It doesn't work if you access to Jira using OAuth even if you have user name and password, and generate a TOKEN
I tried any possible combination but nothing
Just work when I use
curl -u 'user_name:password' . works
curl -u 'email:token' . works
curl -u 'user_name:token' . not works
curl -H -H 'Authorization: Basic <user_name:password base64> . not works
curl -H -H 'Authorization: Basic <email:token base64> . not works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.