How can I manage to get youtrack access token in my desktop application?
I'm building a feature of directly form a new issue from my desktop application which is an IDE. I don't want to add permanent token manually for every user how can I automate these?
Here are few goals I want to achieve :
- Issue must be created for each user by its own ID.
Here is what I'tried:
- I'm able to create an issue.
- As for authorization I'm using permanent token or authorization so It will create a post by the id of author of that token.
- I am unable to create parmanent token for other users using api.
- I'm ubable to integrate OAuth in my project.
Please sign in to leave a comment.
Hi Ofc Himanshu,
As a system admin, you can submit issues on behalf of other users without obtaining their token. Assuming you send an HTTP request to
/api/issues
, add this to the request body:The ID of the user you want to be the author of the issue can be obtained by querying
/api/users
. For more info on the YouTrack REST API resources, please refer to the documentation.Yeah this thing works!, but is there any other option I can try with.
Actually it is kind of hard to get system admin token in my company and we have restriction about private token too.
Ofc Himanshu a user can have the default Project Admin role to be able to create issues via REST API as another user, as shown by Julia earlier. This role should be given in the project that the issue is created in. Other than that, there are no workarounds.