unauthorized_client Right Signature API response

  • 1
  • Problem
  • Updated 4 weeks ago
  • (Edited)

Hello Team,

   We are in the process of integrating our CRM with Right Signature.  We have an approved API key for our account. I tried to authenticate with Private API token and its not working as expected.

Is there any documentation for Private API token based authentication for Right Signature Version 4?

With the community help, I was able to make Authorization header with value of base64 encoded API key. But that ended with a different error. unauthorized_client.

Can some please tell me what we are doing wrong here. FYI, API token is active in portal.

Here is the snippet of PHP code and the response received.

<?php

$API_URL = 'https://api.rightsignature.com/public/v1/documents';

$API_KEY = ‘BASE64-PRIVATE-API-TOKEN’;

$curl = curl_init();

curl_setopt_array($curl, array(

CURLOPT_URL => $API_URL,

CURLOPT_RETURNTRANSFER => true,

CURLOPT_ENCODING =>"",

CURLOPT_MAXREDIRS => 10,

CURLOPT_TIMEOUT => 30,

CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

CURLOPT_CUSTOMREQUEST =>"GET",

CURLOPT_HTTPHEADER => array(

     "authorization: Basic $API_KEY"

),

));

$response = curl_exec($curl);

$err = curl_error($curl);

curl_close($curl);

if ($err) {

    echo "cURL Error #:" . $err;

} else {

    echo $response;

}

?>

Response:

{"error":"unauthorized_client","error_description":"The client application is not approved"}


Thanks

~Aron
Photo of Aron

Aron

  • 7 Posts
  • 1 Reply Like
  • confused

Posted 1 month ago

  • 1
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 18 Posts
  • 3 Reply Likes
Aron,

Would you be able to provide the name of the Client Application you have created, so that we could see if there are any logs related to that at our end?

Thanks
Saravanan
Photo of Aron

Aron

  • 7 Posts
  • 1 Reply Like
Photo of Aron

Aron

  • 7 Posts
  • 1 Reply Like
Hello Saravanan,

   Thanks for getting back. The client app name is : ZipCapitalGroup

Thanks
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 18 Posts
  • 3 Reply Likes
Aron,

I don't see any logs for your client app. Your code looks correct to me. We display that error, if a matching client app could not be found with the api token provided. I believe you are encoding your private api token. Ex: You can use this https://www.base64encode.org/ to encode.

Thanks
Saravanan
Photo of Aron

Aron

  • 7 Posts
  • 1 Reply Like
Hello Saravanan, 

      Thanks for your response.  I was able to figure this out, the base64 encoded string I have generated had a new line since it was created using echo without -n. I see it is working now. Thanks a bunch and appreciate your help.

~Aron