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
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
I'm trying to create a client to query Jira using the REST API.
I gather for CreaterestClient, basic authentication will now longer work and I need to use an apiToken.
How do I get this? I can't see anything under my user profile in Jira. Or should I be using OAuth...there is something under the profile to view OAuth tokens
I'm attempting to connect to Jira V8.13.21 (I assume this is Server)
I'm in the same bag. The C# API has a CreateOAuthRestClient() method, but the params don't seem to correspond at all to what Jira provides on the oAuth setup page, so it's all quite confusing.
Jira provides a client ID and secret key, but the API expects you to pass a consumer key, consumer token (both of which are probably what jira supplies), and also an oAuth access token and oAuth token secret. There's no apparent documentation within jira on where to get those last two items.
Thanks for your response.
I'm still a little confused about how to move forward. I'm developing a .NET app and trying to use the CreateRestApi method.
I can't see how CreateRestApi can use OAuth2.0 - there are only examples for basic authentication and ApiToken.
I'm assuming Basic Auth won't work - I get 500 returned if I attempt this.
So, can the .NET library work with OAuth2.0 or should I bin that and just go with a more native approach and use the OAuth client example?
Also, on the Jira side, what rights are needed to set up the application link for OAuth (just so I know who to go to in my organisation)?
Hello its July 2023 and am trying to follow the instructions myself and have no idea how to proceed as well, the page link given above does not help!
I would also know how to setup the all the tokens for CreateOAuthRestClient so that it works in c#. My company has an existing app but it seems the tokens have stopped allowing all data to come thru, such as the attached images.
Please help so I get make the app work properly again.