Sandbox API Login via Curl

I am getting the error when trying to login via PHP to the sandbox API. This is the curl structure I'm using:

        $ch = curl_init();         curl_setopt($ch, CURLOPT_URL, '');         curl_setopt($ch, CURLOPT_POST, 1);         curl_setopt($ch, CURLOPT_POSTFIELDS, $params);          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);         curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);         curl_setopt($ch, CURLOPT_TIMEOUT, 300);          $result = curl_exec($ch);          curl_close($ch); 

And this is the error:

"{"error":"unknown_error","error_description":"retry your request"}" 

These are the params that I'm sending:

params = array(         'grant_type'    => 'password',         'client_id'     => $clientId,         'client_secret' => $clientSecret,         'username'      => $username,         'password'      => $password . $securityToken,     ); 

I'm not sure why I'm getting this error. When using the regular URL, I can login just fine, the problem is with the sandbox, where I have an account as I can log in just fine via Web.

Thank you,



Category: api Time: 2016-07-28 Views: 1
Tags: php curl api

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.291 (s). 12 q(s)