Hello everybody. I tried to connect to my jira cloud instance with basic authentication but it throws me "deprecation" error. I've generated the code api with Swagger.
Is it possible to use the same code api but with Oauth authentication?
To connect your cloud instance using basic auth, you need to:
For Oauth, I believe this is also possible, however, I need to look this up.
Regards
You can have a look at the following for Oauth authentication with Cloud.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah ok, just tried and the authentication is working now.
Just another thing. When i try to achieve a Project it throws me this error:
Exception in thread "main" java.lang.IllegalArgumentException: missing discriminator field: <>
at com.atlassian.oauth.client.example.config.JSON.getDiscriminatorValue(JSON.java:2247)
at com.atlassian.oauth.client.example.config.JSON.access$000(JSON.java:37)
at com.atlassian.oauth.client.example.config.JSON$18.getClassForElement(JSON.java:1988)
Do you now something about?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any updates on this, would be great if anyone could help in how to tackle this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got this to work, that is I have a test project which I can read the content of the issue with the correct oauth2 token and this path :
first you go here : https://developer.atlassian.com/console/myapps/
create a app. Add all the scopes you need for access and take note of the client secret parts it generates
then you can go here : https://auth.atlassian.com/oauth/token
with grant type client_credentials
client_id and client_secret from that previous page
scope = your list of scopes you want
and if thats correctly done you get a access_token
then you call this : https://api.atlassian.com/oauth/token/accessible-resources
and from there you get id: url etc. use that id as couldid here in the last thing below
https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/issue/<projectname>-<issue number>
and from that you can get issue details from jira.
hope that helps.
Regards,
Emil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Emil Emilsson
Thanks for mentioning all the steps in detail.
I followed the same steps and got the access_token.
but when I call - https://api.atlassian.com/oauth/token/accessible-resources with that access_token then I get 200 with Empty Response.
Is there something else I'll need to configure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, when call this : https://api.atlassian.com/oauth/token/accessible-resources
return all jira site, but i want to get only the datanet of the one i selected from sending code․ what can I do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Vahe Vardanyan did you find any answer to this? I am also stuck on the same problem.
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.