-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth2 Issues #269
Comments
Hello @cmerther! Right config for you: const jira = new Version3Client({
// I've tried settings the host to the api.atlassian.com base but it produces the same results. which I think was the solution for #231
// host: `https://api.atlassian.com/ex/jira/${cloudId}`,
host: 'https://site.atlassian.net',
newErrorHandling: true,
authentication: {
oauth2: {
accessToken: accessToken.access_token,
},
},
}); |
Thank you for the quick reply! But I forgot to include that I've tried that. If I don't have |
Please show me an exact example of how you tried |
The access_token is short lived, only an hour, let me know if you need another one.
|
No I mean when you used This example I need |
Alright,
|
Very weird. Looks like it should work |
I can confirm this works for me for version3Client as well as AgileClient: const jira = new Version3Client({
host: `https://api.atlassian.com/ex/jira/${cloudId}`,
newErrorHandling: true,
authentication: {
oauth2: {
accessToken: accessToken.access_token,
},
},
}); None of the above solutions described above work for me, either using: host:`${yoursite}.atlassian.net` or accessToken: `Bearer ${accessToken.access_token}` Thanks for raising this issue @cmerther, made my day 👍 |
Hello,
I am trying to use jira.js to read project info and write issues to my jira project. I'm using atlassian's OAuth (3LO) authentication flow. The scopes that I use for this login are
read:jira-work write:jira-work read:me offline_access
.I was reading over issue #231 and found out about https://api.atlassian.com/oauth/token/accessible-resources and the api at https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3.
After much trial and error I've got one endpoint working through a raw get request
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/project/{jiraProjectKey}
which will return information. However when I try to do the same call through the library it doesn't find any project with that key.Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered: