Skip to content

I got code from call back uri but the page got forbidden error . Please help me as soon as possible. #14

@gitDharani

Description

@gitDharani

I got code from call back uri but the page got forbidden error .

Here is my code:

'CBJCHBCAABAACy-HGbREFB_LS3kSjs7031GkfIVgMZZl', 'clientSecret' => 'pxttR1nPf9nROrLR72YRAO6GZ7ZEPlEk', 'redirectUri' => 'https://serverurl/adobe-sign-php-master/', 'dataCenter' => 'mcl.in1', 'scope' => [ 'user_read:account', 'scope2:type' ] ]); //$adobeSign = new AdobeSign($provider); $adobeSign = new KevinEm\AdobeSign\AdobeSign($provider); //$accessToken = $adobeSign->getAccessToken($_GET['code']); if (!isset($_GET['code'])) { $authorizationUrl = $adobeSign->getAuthorizationUrl(); $_SESSION['oauth2state'] = $provider->getState(); header('Location: ' . $authorizationUrl); } elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { unset($_SESSION['oauth2state']); exit('Invalid state'); } else { $accessToken = $adobeSign->getAccessToken($_GET['code']); $adobeSign->setAccessToken($accessToken->getToken()); $adobeSign->createAgreement([ 'documentCreationInfo' => [ 'fileInfos' => [ 'libraryDocumentId' => 'your_library_document_id' ], 'name' => 'My Document', 'signatureType' => 'ESIGN', 'recipientSetInfos' => [ 'recipientSetMemberInfos' => [ 'email' => 'test@gmail.com' ], 'recipientSetRole' => [ 'SIGNER' ] ], 'mergeFieldInfo' => [ [ 'fieldName' => 'Name', 'defaultValue' => 'John Doe' ] ], 'signatureFlow' => 'SENDER_SIGNATURE_NOT_REQUIRED' ] ]); } ?>

Originally posted by @gitDharani in #13 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions