Skip to content

Conversation

@imclean557
Copy link

Support for Telstra Messaging API v2 using SDK https://github.com/telstra/MessagingAPI-SDK-php

@imclean557
Copy link
Author

Telstra dev contact for getting SDK added to Packagist would be: t.dev@team.telstra.com

Forums are also mildly useful: https://dev.telstra.com/forums/messaging-api-forum

$this->provisioningApi->getConfig()->setAccessToken($this->telstra_authenticate());
$provision_request = new \Telstra_Messaging\Model\ProvisionNumberRequest();

$provision_response = $this->provisioningApi->createSubscription($provision_request);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getSubscription() to check for existing subscription before creating a new one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, calling createSubscription() again can extend the life of a number.

@imclean557
Copy link
Author

v2 of the API has some additional features, including automatically concatenating messages up to a maximum of 1900 characters. See: https://github.com/telstra/MessagingAPI-v2/blob/master/Introduction.md

@imclean557
Copy link
Author

@dpi, Steve at Telstra Dev got back to me regarding Packagist. It was was on his todo list but he's been on leave. The SDK has now been added to Packagist. https://packagist.org/packages/telstra/messagingapi-sdk-php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant