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

  • 1
  • Problem
  • Updated 7 months ago
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
Photo of Giancarlo Cunis

Giancarlo Cunis

  • 90 Points 75 badge 2x thumb

Posted 7 months ago

  • 1
Photo of Paco Vu

Paco Vu

  • 456 Points 250 badge 2x thumb
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
Photo of Giancarlo Cunis

Giancarlo Cunis

  • 90 Points 75 badge 2x thumb
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"

    } ]

  } ]

}
Photo of Paco Vu

Paco Vu

  • 456 Points 250 badge 2x thumb
Can you check and let me know what is the PlatformType and Authorization flows of your app?

Thanks,
Photo of Giancarlo Cunis

Giancarlo Cunis

  • 90 Points 75 badge 2x thumb
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.