Skip to content

Exception when calling CallbackApi->createCallback: [400] Error connecting to the API (https://smsgateway.me/api/v4/callback) #20

@hfrance

Description

@hfrance

[27-Jun-2020 15:22:44 UTC] PHP Fatal error: Uncaught SMSGatewayMe\Client\ApiException: [403] Error connecting to the API (https://smsgateway.me/api/v4/message/send) in /home/smsmarketing/public_html/api/client-php/lib/ApiClient.php:247
Stack trace:
#0 /home/smsmarketing/public_html/api/client-php/lib/Api/MessageApi.php(525): SMSGatewayMe\Client\ApiClient->callApi('/message/send', 'POST', Array, '[{"phone_number...', Array, '\SMSGatewayMe\C...')
#1 /home/smsmarketing/public_html/api/client-php/lib/Api/MessageApi.php(459): SMSGatewayMe\Client\Api\MessageApi->sendMessagesWithHttpInfo(Array)
#2 /home/smsmarketing/public_html/api/client-php/test.php(23): SMSGatewayMe\Client\Api\MessageApi->sendMessages(Array)
#3 {main}
thrown in /home/smsmarketing/public_html/api/client-php/lib/ApiClient.php on line 247

require 'vendor/autoload.php';

use SMSGatewayMe\Client\ApiClient;
use SMSGatewayMe\Client\Configuration;
use SMSGatewayMe\Client\Api\MessageApi;
use SMSGatewayMe\Client\Model\SendMessageRequest;

// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'AAAAAAAAAAAPPPPPIIII');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');

$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$callback = new \SMSGatewayMe\Client\Model\CreateCallbackRequest(); // \SMSGatewayMe\Client\Model\CreateCallbackRequest | callback to create

try {
$result = $api_instance->createCallback($callback);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->createCallback: ', $e->getMessage(), "\n";
}

any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions