新的RightSignature API" public / v1 / sending_requests"抛出invalid_scope错误

时间:2017-11-30 13:36:33

标签: php api curl

以下是我的脚本。我不断收到invalid_scope错误。

 $arr = array(

    'file' =>
        array(
        'name' => 'pdf.pdf',
        'source' => 'upload',
        ),
    'document' =>array(
        'signer_sequencing' => 'false',
        'expires_in' => '12',
        'name' => 'Signme',
        'roles' =>array(
            'name' => 'a',
            'signer_email' => 'example@gmail.com',
            'signer_name' => 'farqalit',
            ),
        ), 
        'sending_request' =>array(),
    );

    $post_json = json_encode($arr);
    $endpoint = "https://api.rightsignature.com/public/v1/sending_requests?access_token=API_TOKEN";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS,  $post_json);       
    curl_setopt($ch, CURLOPT_URL, $endpoint);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' ));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($ch);

0 个答案:

没有答案