File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ A software development kit to provide ways to interact with CM.com's Text servic
1717### Instantiate the client
1818Using your unique ` ApiKey ` (or product token) which authorizes you on the CM platform. Always keep this key secret!
1919
20+ The product token can be found in the [ Channels] ( https://www.cm.com/app/channels ) application on the platform, under the ` Gateway ` section.
21+
2022``` php
2123$client = new \CMText\TextClient('your-api-key');
2224```
Original file line number Diff line number Diff line change @@ -49,9 +49,16 @@ class Channels
4949 /**
5050 * Send Apple Business Chat messages.
5151 * @note CM needs to configure this with you.
52+ * @deprecated instead use APPLEMESSAGESFORBUSINESS
5253 */
5354 const IMESSAGE = 'iMessage ' ;
5455
56+ /**
57+ * Send Apple Messages For Business messages.
58+ * @note CM needs to configure this with you.
59+ */
60+ const APPLEMESSAGESFORBUSINESS = 'Apple Messages for Business ' ;
61+
5562 /**
5663 * Send Line messages.
5764 * @note CM needs to configure this with you.
@@ -87,4 +94,10 @@ class Channels
8794 * @note CM needs to configure this with you.
8895 */
8996 const INSTAGRAM = 'Instagram ' ;
97+
98+ /**
99+ * Send Telegram messages.
100+ * @note CM needs to configure this with you.
101+ */
102+ const TELEGRAM = 'Telegram Messenger ' ;
90103}
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ class Message implements JsonSerializable
3131 /**
3232 * @var string Sender name
3333 * @note Twitter requires the snowflake-id of the account you want to use as sender
34+ * @note MobilePush: use the app key of the account you want to use as sender.
35+ * @note Facebook Messenger: use the Facebook Page ID of the account you want to use as sender.
36+ * @note Google Business Messages: use the Google Business Messages agent ID of the account you want to use as sender (without dashes).
37+ * @note Instagram: use the Instagram Account ID of the account you want to use as sender.
38+ * @note Telegram: use the Telegram Bot ID of the account you want to use as sender.
3439 */
3540 private $ from ;
3641
@@ -42,6 +47,10 @@ class Message implements JsonSerializable
4247 /**
4348 * @var array List of Recipients
4449 * @note Twitter requires the snowflake-id
50+ * @note Facebook Messenger: use the Facebook Page Scoped User ID (PSID).
51+ * @note Google Business Messages: use the Google Business Messages conversation ID (without dashes).
52+ * @note Instagram: use the Instagram Scoped User ID (IGSID).
53+ * @note Telegram: use the Telegram Chat ID.
4554 */
4655 private $ to = [];
4756
You can’t perform that action at this time.
0 commit comments