Recent searches
No recent searches
Creating a ticket for a customer
Posted Feb 19, 2021
I'd like to programmatically create a ticket for a user.
When I use the Create Ticket API with the Oauth token, and the user as the requester, they get a ticket that says "Created on your behalf", and includes the name of the agent that created the API token, which is not what we want.
I'd like to submit tickets that come in with the user as submitter directly.
0
4
4 comments
Greg Katechis
Hi Ozzie! it looks like you're probably using the Tickets API, instead of the Requests API. The Requests API will allow you to make tickets on behalf of your end-users and will have their information set as the Requester. Take a look at this article to help you see how this works!
0
Ozzie Osman
Got it. It looks like the requests API requires me to either pass a user's email address if they are an actual user, or create an anonymous request.
Is there a way to just pass an email address, and have the request be linked to a user if one exists but be anonymous if no user with that email exists?
Thanks,
0
Greg Katechis
Yes, you could definitely do that! The one thing that you would need to do, however, is ensure that you are also including a `name` attribute since that is required for anonymous requests. If you don't have the user's name, you could simply pass in the email address that they provide as the name as well before sending the request to your instance.
0
Olve Auråker
@..., were you able to create a ticket through the request API using an OAuth token on behalf of a user using their email address?
Edit. Never mind, I managed it about 30 seconds after posting :)
0