Sorry, you need to enable JavaScript to visit this website.

You are here

NOT-PROVISIONED

2 posts / 0 new
Last post

Shenhang's picture
by Shenhang

NOT-PROVISIONED
 My English is not good. What should I do with this mistake?  Can  help me? (telstra-messaging-php)     'status' => '400',     'code' => 'NOT-PROVISIONED',     'message' => 'Application must be provisioned before sending',      

DeveloperSteve's picture
by DeveloperSteve

Hi Shenhang24

Its because you havent done the provision/subscription call yet to assign a mobile number to your api keys, using the php sdk you need to do something like .... 

$config = Telstra_Messaging\Configuration::getDefaultConfiguration()->setAccessToken($result['access_token']);

$apiInstance = new Telstra_Messaging\Api\ProvisioningApi(
    new GuzzleHttp\Client(),
    $config
);

$arr = array(
 "active_days" => 30,
 "notify_url" => "https://callbackurl.here" //optional
);

$body = new \Telstra_Messaging\Model\ProvisionNumberRequest($arr);

$result = $apiInstance->createSubscription($body);
print_r($result);

 

Log in or register to post comments