Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JIRA XRAY - problems authenticating



I'm trying to import an xml report to Jira xRay - to a Test Execution item.

The documentation I can find makes reference to client_id and client_secret, which should be generated by Create API key. Create API key only generates one string, a token.

As such I can't figure out how to use just the token to submit the xml report.

For example, this command:

curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json"

I can't use it, as it needs client_id and client_secret. Also, the endpoint itself returns 

Cannot GET /api/v2/authenticate


Using this command:

curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token"  --data @"data.xml"


results in "{"error":"Invalid JWT: JsonWebTokenError: jwt malformed"}"


Please can anyone help?

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Nov 09, 2021

Hi @Adam Grzegorzewski 

This only happens when the token is not correctly stored/sent in the request.

Ensure that the token is exactly as returned by the authentication API, without linefeeds or any other character that does not exist in the returned token.

If you need further help, please contact Xray Support ( to help further.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Shelton Bowers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Feb 08, 2023

Hi ...I have tried to do the same and have this exact issue and receive the output message above. 

I have found the Token is not getting generated using the methods outlined in the XRay documentation:

Created a file with JSon including Jira Security Tokens in the Credentials:
cloud_auth_sb.json file contains:

{"client_id":"<value copied from my profile id in the profile page URL>", "client_secret":"<string copied from the Jira User Security token>"}


token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth_sb.json"| tr -d '"')
ECHO "$token" >> auth_token_results.txt
The auth_token_results.txt file contains:
{error:Authentication failed. Invalid client credentials!}
Am I missing something can you please update your documentation on how to get the Credentials from Jira?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events