ringcentral / ringcentral-php

RingCentral Connect Platform PHP SDK
MIT License
54 stars 52 forks source link

Client error: `POST https://platform.devtest.ringcentral.com/restapi/oauth/token` resulted in a 400 Bad Request #97

Closed savanihd closed 2 years ago

savanihd commented 3 years ago

Added Current Information but i am getting following code and error:

` $rcsdk = new RingCentral\SDK\SDK(env('RINGCENTERAL_CLIENTID'), env('RINGCENTERAL_CLIENTSECRET'), RingCentral\SDK\SDK::SERVER_SANDBOX, 'Demo', '1.0.0');

    $platform = $rcsdk->platform();

    $auth = $platform->login(env('RINGCENTERAL_USERNAME'), env('RINGCENTERAL_EXTENSION'), env('RINGCENTERAL_PASSWORD'));

    $apiResponse = $platform->post('/restapi/v1.0/account/~/extension/~/sms', array(
        'from' => array('phoneNumber' => env('RINGCENTERAL_SMSNUMBER')),
        'to'   => array(
            array('phoneNumber' => '+17209246433'),
        ),
        'text' => 'Test from PHP',
    ));

    dd($apiResponse);`

Getting bellow error with screen show. localhost-8000

Can you help me?

tylerlong commented 2 years ago

This is not a SDK issue. Please create a ticket here https://developers.ringcentral.com/support/create-case

If it because the RingCentral app you created doesn't support password flow.