Unable to set channel with requests API | Community
Skip to main content

Unable to set channel with requests API

  • April 16, 2022
  • 3 replies
  • 0 views

Furkan12

Dear,

I am trying to create a ticket using requests API within a specific channel. I have already tried setting with type or id but no luck.

Is there anything I'm overlooking?

  "via": {    "channel": "web_form"  }
  "via": {    "channel": 0  }

3 replies

Greg29
  • April 18, 2022

Hi Jason! The `via` parameter can have some unexpected behavior, depending on where you're viewing the creation channel. Could you tell me more about what you're seeing when you're creating these tickets? Is the ticket not actually being created or is the channel being set as something other than "web_form?"


Furkan12
  • Author
  • April 18, 2022

Dear,

Thanks for your reply.

The tickets are created but with the channel web_service. Every other parameter works fine.


Greg29
  • April 19, 2022
Thanks for clarifying that for me. I think I may have an idea of what's going on. Are you creating these as anonymous or end-user authenticated requests? If so, via won't be available to be modified, as that would require admin authentication. If you do want to allow for this, you'll want to use an API token to handle this, as we outline here.