Forum Discussion

notmy_realname's avatar
notmy_realname
Active Contributor
7 months ago

API Create New Channel

I am only just dipping my toes into the API documentation and playing around to see what automations we may incorporate into our workflow. 

I'd like to save employees time with reminder text messages. In my initial review of the docs I see that I can send sms messages. Perfect. 

 

I want to record the messages being sent and any responses we may receive. 

 

I was looking over the Messaging Webhook Notifications section to set up the webhook for events and the bodies of those messages. Here, the Super Admin Authorization Flow indicates that I, as the Super Admin must create a subscription and be the owner of the channel. 


So in Messaging Create a subscription for a given phone number, I must first create the channel, in order to provide the channel iD.

 

In Channels Create a notification channel, using cURL and the examples provided, I went to set up my first channel using the following data successfully.

{ "channelType": "Webhook", "channelNickname": "TEST", "webhookChannelData": { "webhook": { "url": "https://mysite.com/sms-webhook" } }, "channelLifetime": 10800 }


How do I create a nickname for the channel? I tried with and without "channelNickname": "TEST" and it still came back as the default "integrations." Elsewhere in the documentation it seems that this could be user-defined-- How?

Even though I definted the channel type as Webhook, it came back as WebSockets. I didn't get anything back in the response regarding the webhookChannelData. No idea why that is. 

The lifetime came back as 1200 instead of 10800. What is the lifetime limit?

  • GlennD's avatar
    GlennD
    GoTo Manager

    Hi notmy_realname, welcome to the community. 

     

    For API support please cut and paste the following template, complete it, and please send it to developer-support@goto.com

     

    • Product: {Enter your data here}
    • Problem Description: {Enter your data here}
    • API Method: {Enter your data here}
    • Request URL: {Enter your data here}
    • Request Headers: {Enter your data here}
    • Request POST Data (if applicable): {Enter your data here}
    • Response HTTP Code: {Enter your data here}
    • Response Body: {Enter your data here}
    • Account ID: {Enter your data here}
    • Client ID: {Enter your data here}
    • Email that was being used to create the access token: {Enter your data here}