Comment a ticket via API for another user
Hello!
I'm currently using youTrack REST API to embed a ticket visualisation for our customers in our dedicated application. To do this, I have an agent user to link our application with YouTrack and make all the requests.
I'm now trying to add a form so the user can add comment to its ticket, like one would do through a mail reply.
However, whatever I'm trying, I'm unable to make it as if it is the user that creates it, it's always my special agent user that is the author.
Is there a way to create a ticket comment via API on behalf of another user?
Please sign in to leave a comment.
Hi! Permanent tokens are not supported for users with the reporter type, so there is no supported way to use REST API to create comments on behalf of reporters. As this is by design, we'd rather suggest upgrading such accounts to standard users. Standard users can have permanent tokens created in their account.
Hi Stanislav Dubin !
Thanks for your quick reply. This was not exactly what I meant. I created an agent user with a token so my application can create tickets in a helpdesk projects.
It works well as I can specify the “email” in the API call (I simulate the submission of a feedbackForm, as you suggested in another thread). So any user in my application can submit a ticket for a specific email. The ticket is created by my special agent user, but on behalf of another one.
I wondered if there is a smiliar a mechanism for the comments, for exemple filling the “author” field, so that a user in my application could comment a ticket, but under the hood the API is called by my special user, on behalf of someone else.
Hi Nathanael Spriet, thanks for the clarification! No, there is no similar mechanism for agents to leave comments on behalf of reporters. The only other option would be using a token, but this isn't available for reporters.
Ok, that's what I thought. Are there any plans on doing such a thing? It would be consistent with how we can create a ticket on behalf of another user.
Thanks!
This mechanism was needed to allow agents to initiate the conversation with external parties without making the agent the ticket author. The external users are expected to engage in the conversation themselves once the ticket is created on their behalf, so there are no plans to make the same mechanism for comments.