question

giancarlo-cunis9397 avatar image
giancarlo-cunis9397 asked giancarlo-cunis9397 commented

Getting cURL error 56: Received HTTP code 405 from proxy after CONNECT

Getting the error below. Getting a connection and it shows up as error on the dashboard. Use the tutorial code examples but does not auth.


Array ( [username] => +13128680141 [extension] => 101 [password] => ****** )

Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 56: Received HTTP code 405 from proxy after CONNECT (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /Applications/MAMP/htdocs/Paradise/wp-content/plugins/ring-central/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:187 Stack trace: #0 /Applications/MAMP/htdocs/Paradise/wp-content/plugins/ring-central/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 /Applications/MAMP/htdocs/Paradise/wp-content/plugins/ring-central/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 /Applications/MAMP/htdocs/Paradise/wp-content/plugins/ring-central/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandl in /Applications/MAMP/htdocs/Paradise/wp-content/plugins/ring-central/vendor/ringcentral/ringcentral-php/src/Http/Client.php on line 50

getting started
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

paco-vu avatar image
paco-vu answered
Hi Giancarlo,

I am not sure how you posted a curl request but the log above shows me some suspect that the login credentials are in an array (Array ( [username] => +13128680141 [extension] => 101 [password] => ****** ) ). They need to be in a JSON format. Can you double check and post the complete curl request if this does not help.

+ Phong
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

giancarlo-cunis9397 avatar image
giancarlo-cunis9397 answered giancarlo-cunis9397 commented
I am using PHP SDK and the error above I get when platfrom->login(username,extension,password); I followed the tutorial on the site.  Ran the command line below and this is the results.

curl -u '184c_8YfSKa0xj6rtn0DyA:HnBtP-ZGT3SLYTICaKFnJgLwbwLhF1SIalCS53YZwoEg' -d 'grant_type=authorization_code&username=+13128589951&extension=101&password=#Paradise12' -X POST https://platform.devtest.ringcentral.com/restapi/oauth/token

{

  "error" : "invalid_request",

  "error_description" : "Parameter [code] value is invalid",

  "errors" : [ {

    "errorCode" : "CMN-101",

    "message" : "Parameter [code] value is invalid",

    "parameters" : [ {

      "parameterName" : "parameterName",

      "parameterValue" : "code"

    } ]

  } ]

}
2 comments
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Can you check and let me know what is the PlatformType and Authorization flows of your app?

Thanks,
0 Likes 0 ·
The platform is set to server/web and the auth flow is auth code  | Refresh Access Token.
We are using the php SDK on the website. We just want to send sms to customers. Are the platform and auth flow correct for what we need it for.
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys