Skip to main content

After getting access token when i try to send Test fax it is showing error, I need help

here is my code for sending fax


if ($platform->loggedIn()){


$request = $rcsdk->createMultipartBuilder()

->setBody(array(

'to' => array(

array('phoneNumber' => '12673314004'),

),

'faxResolution' => 'High',

))

->request('/account/~/extension/~/fax');



$response = $platform->sendRequest($request);

}




and here is the Error

Tayyab,

Per the error description "Token Not Found" it looks like you are not using the token to make the API call ( Fax API Endpoint

For more guidance, you can take a look at the demo inside of our Official PHP SDK:
https://github.com/ringcentral/ringcentral-php

Have you tried using the Demo under the SDK ? 
i am using Web app, so after 3-Legged OAuth access token , i am not sure how to use that token and in https://github.com/ringcentral/ringcentral-php there is no help to use token .

Right now i am stuck at this point.


There are few examples to help you in php, below links may help you:

https://github.com/ringcentral/ringcentral-php/blob/master/demo/fax.php

https://developers.ringcentral.com/guide/messaging/fax/sending-faxes

https://forums.developers.ringcentral.com/questions/1402/problem-with-fax-api-service.html

A number of SDKs also have built-in fax request helpers including:

PHP on Packagist: https://packagist.org/packages/ringcentral/ringcentral-php


Reply