You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to use REST API for Jira-Xray Cloud. I looked through this pages https://docs.getxray.app/display/XRAYCLOUD/Authentication+-+REST+v2 and https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys
I only found this page https://id.atlassian.com/manage-profile/security/api-tokens for creating a user token. And I cannot see Client Id and Client Secret there. I only have the token created.
Then I tried a REST API request with the token created, but got 401 "Invalid JWT: JsonWebTokenError: jwt malformed".
What am I doing wrong?
Hi @Zakhar Yermakovich - welcome to the community,
Do you have admin permission in your system?
The settings for API client & secret need to be set in admin section of the site.
Click the coq icon in the upper right corner and select "Apps". This will lead you into the admin console where apps/plugins are managed. In the left menu bar scroll down until you reach the xray section. There you´ll find a dedicated menu item for API keys (see screenshots below).
Hope this was helpful.
Best
Stefan
Thank you for the answer.
I do not have admin permissions in my system. But do I have to have them? I thought I only need a token to connect to the REST API and I created a token...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May be I just use the token incorrect way?
The error message in response is says "jwt malformed"...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case (to store an xray api token): Yes admin rights are needed.
You created a token for the jira REST API. As you would like to authenticate to XRAY REST API you would need a separate token for that API.
If you don´t have admin rights please contact your site/jira admin and clarify the use case behind. I´m sure they will find a solution.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any update? could you contact your jira admin?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan!
(This is my second account)
I appreciate your help. It looks like you are right.
I still didn't reach the admin, he is at a vacation.
But I created a support ticket and they said almost the same as you did.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do a lot of support and answering questions related to xray as a community leader. The api key topic is kinda confusing for many users and the question was asked frequently. (and I‘m a heavy xray user and admin as well).
Please consider to hit the accept button next to the answer. This will mark the posting as solved and makes it easier for other users to find the right solution for their problems.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.