Determining the Channel ID of a Channel User
Determining the Channel ID of the new user
When creating a new user, you need two main pieces of information. The Connection ID of the bot you want to add the user to, which is described in the section above, and the "Channel ID" or "User ID" of the new user. The Channel ID is determined by the channel provider, and is combined with the Connection ID to form the users Response Path. What to use for the Channel ID will depend on the type of channel you are adding a user to. For example, for Twilio SMS/WhatsApp, the Channel ID will be the phone number preceded by the country code of the user. For example, a typical Channel ID for a US phone number looks like this: "+17071234567". For WhatsApp, the Channel ID is also a phone number, but does not usually have the country code, for example "7071234566". Both Twilio and WhatsApp provide ways to contact a user that hasn't already contacted your bot - which is why they use phone numbers as Channel Identifiers, since these are pieces of information you can gather from your users in a non-technical fashion. For that reason, SMS and WhatsApp are the most useful types of bots to create users for.
Telegram, Slack and Facebook use internal identifiers that aren't easy to find in a non-technical fashion. If you know what you are doing, you can discover these identifiers in various ways, mostly by inspecting Flow XO interaction logs. This is particularly useful for Telegram power users, as you can use our Create User features to add people to your audience that are discovered through a bots admin membership in a group or channel, or from a forwarded message or certain other unique cases.
When deciding on the Channel ID to use when creating a user, it's a good idea to inspect the Channel IDs from your interaction log for the bot you want to add the user to to make sure you use the exact format the bot uses. There is no room for error here, as the channel ID must match the identifier of the platform exactly.
In the image above (from the interaction logs in Flow XO), you can see that there is both a Channel ID and a User ID. Both can be used as the Channel ID for a new user. You can use this fact to add users to your audience by creating a user with their User ID as the "Channel ID" of the new user. You can then send them direct messages, not just message them by sending messages to the entire group. You will also find this useful in Slack, where there are also groups where you might encounter users you will want to message later.
Usually, however, for most other channels the Channel ID and the User ID will be the same.