I am trying to make a connect app.In the app I'll need the api token of the user to add some information to user's(user is the one who installed the app)jira instance.My connect app should fetch user's api token.Can anyone please tell me how can I add a program which fetches users api-token
@Harshit Somani When using ACE (https://developer.atlassian.com/cloud/confluence/getting-set-up-with-ace/), there are also options that are also options that are much more straightforward.
They are documented in the https://bitbucket.org/atlassian/atlassian-connect-express/ Read.me file in the How to send a signed outbound HTTP request back to the host paragraph.
This is how it is currently documented:
Cheers,
Caterina
Hello @Harshit Somani ,
It is not clear why you would need the user API Token in order to add some information about the user in the instance. Can you please clarify?
I am asking because in a connect app you can just impersonate the user and do whatever change on behalf the user:
User impersonation for Connect apps
Atlassian Connect supports user impersonation via the JWT Bearer token authorization grant type for OAuth 2.0. This authorization method allows apps with the appropriate scope (
ACT_AS_USER
) to access resources and perform actions in Jira and Confluence on behalf of users.
For further details on this please see:
Finally, for the future, please notice that this is not the best place to get help on development related questions. The right resources are listed in https://developer.atlassian.com/resources.
Specifically:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dario B
As shown in this link https://developer.atlassian.com/cloud/assetsapi/rest/api-group-assets/#api-asset-get,
I am trying to add assets to jira instance,If I use the same python code shown in that link,
response = requests.request( "GET",
url,
headers=headers )
we'll get an error which says
{"errorMessage":"Request must be made by an active logged in user"}.
In order to recctify this error we can change the code as
response = requests.request( "GET",
url,
headers=headers ,
auth=('harshitsomani26@gmail.com','ZBI78xxxxxxxxxxxxxxx'))
So in order to do a PUT or GET request we need the user mail and api token of the jira instance,So I want to retrivee mail id and api token and store them in variables and use those varaibles in my python code,so that any user need not enter his user credentials when trying to run this program
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Harshit Somani ,
As already mentioned, if you are building a connect add-on then you don't need any API Token since connect add-on use a different way to authenticate and impersonate users ( see Security for Connect apps and User impersonation for Connect apps for details).
Once this has been said, please notice that:
I hope this helps.
Cheers,
Dario
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.