Problem in getting access token

  • 1
  • Problem
  • Updated 8 months ago
hi,i'm using RightSignature API, I want to try this api with curl. when I request for access token it give "Forbidden" as response. what is wrong with this?
here is my curl request.


$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.rightsignature.com/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => array(
"client_id" => "05208607448b27cf43f7f3142e5397f4d4e5ecc83eb046b5d2ed0289b50fb6d7",
"redirect_uri" => "http://d10a6b40.ngrok.io/testprojects/rightsign/callback.php",
"code" => "AUTHORIZATION_CODE",
"response_type" => "code",
"scope" => "read write"
),
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"postman-token: 23fd8d9f-3cc8-066e-1cdb-d7d101b77981",
"Content-Type: text/xml;charset=utf-8",
"api-token: pv_956b934fba234e25aab9d7ad256763f9"
),
CURLOPT_USERAGENT => "http://d10a6b40.ngrok.io/testprojects/rightsign/callback.php?code=AUTHORIZATION_CODE",

));

thanx in advance 
Photo of abdul hannan

abdul hannan

  • 10 Posts
  • 0 Reply Likes

Posted 8 months ago

  • 1
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 63 Posts
  • 5 Reply Likes
Are you being prompted to authenticate before you receive the error?
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 63 Posts
  • 5 Reply Likes
Have you tried making requests not using postman generated code?
Photo of abdul hannan

abdul hannan

  • 10 Posts
  • 0 Reply Likes
yes, but now I'm using private token and accessing api well. 
thanx Kelly for kind reply.