diff --git a/README.md b/README.md index 84b40aa..aee7351 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ A software development kit to provide ways to interact with CM.com's Text servic ### Instantiate the client Using your unique `ApiKey` (or product token) which authorizes you on the CM platform. Always keep this key secret! +The product token can be found in the [Channels](https://www.cm.com/app/channels) application on the platform, under the `Gateway` section. + ```php $client = new \CMText\TextClient('your-api-key'); ``` diff --git a/src/CMText/Channels.php b/src/CMText/Channels.php index 474cd52..ba6bbc6 100644 --- a/src/CMText/Channels.php +++ b/src/CMText/Channels.php @@ -49,9 +49,16 @@ class Channels /** * Send Apple Business Chat messages. * @note CM needs to configure this with you. + * @deprecated instead use APPLEMESSAGESFORBUSINESS */ const IMESSAGE = 'iMessage'; + /** + * Send Apple Messages For Business messages. + * @note CM needs to configure this with you. + */ + const APPLEMESSAGESFORBUSINESS = 'Apple Messages for Business'; + /** * Send Line messages. * @note CM needs to configure this with you. @@ -87,4 +94,10 @@ class Channels * @note CM needs to configure this with you. */ const INSTAGRAM = 'Instagram'; + + /** + * Send Telegram messages. + * @note CM needs to configure this with you. + */ + const TELEGRAM = 'Telegram Messenger'; } \ No newline at end of file diff --git a/src/CMText/Message.php b/src/CMText/Message.php index 7de3ee3..f17c420 100644 --- a/src/CMText/Message.php +++ b/src/CMText/Message.php @@ -31,6 +31,11 @@ class Message implements JsonSerializable /** * @var string Sender name * @note Twitter requires the snowflake-id of the account you want to use as sender + * @note MobilePush: use the app key of the account you want to use as sender. + * @note Facebook Messenger: use the Facebook Page ID of the account you want to use as sender. + * @note Google Business Messages: use the Google Business Messages agent ID of the account you want to use as sender (without dashes). + * @note Instagram: use the Instagram Account ID of the account you want to use as sender. + * @note Telegram: use the Telegram Bot ID of the account you want to use as sender. */ private $from; @@ -42,6 +47,10 @@ class Message implements JsonSerializable /** * @var array List of Recipients * @note Twitter requires the snowflake-id + * @note Facebook Messenger: use the Facebook Page Scoped User ID (PSID). + * @note Google Business Messages: use the Google Business Messages conversation ID (without dashes). + * @note Instagram: use the Instagram Scoped User ID (IGSID). + * @note Telegram: use the Telegram Chat ID. */ private $to = [];