1

I am using version 6 for echosine api,

I need to create webhook for get event from agreement.

I am testing to create webhook from below url:

https://secure.na1.echosign.com/public/docs/restapi/v6#!/webhooks/createWebhook

here I have passed below details:

{
  "name": "agreement history",
  "scope": "USER",
  "state": "ACTIVE",
  "webhookSubscriptionEvents": [
    "AGREEMENT_CREATED"
  ],
  "webhookUrlInfo": {
    "url": "MY_SITE_URL_TO_GET_WEBHOOK_EVENT_RESPONSE.php"
  }
}

in MY_SITE_URL_TO_GET_WEBHOOK_EVENT_RESPONSE.php file I have written code as below,

<?php

$headers =array();
foreach (getallheaders() as $name => $value) {
    $headers[$name] = $value;
}

$myfile = "webhookResponse.txt";
$fh = fopen($myfile, 'a');
fwrite($fh, $_POST."\n");
fclose($fh);

http_response_code(200);
return json_encode(["xAdobeSignClientId" => $headers["X-AdobeSign-ClientId"]]);
?>

when I fire request to create webhook,

It gives me response as below,

{
  "code": "INVALID_API_ACCESS_POINT",
  "message": "Request must be made to correct API access point (e.g. use GET /baseUris)."
}

with response code of 403.

How to resolve this issue???

how to create webhook with adobe echosine?

hetal gohel
  • 335
  • 9
  • 21

1 Answers1

1

To make any EchoSign API call, first, you need to obtain your correct API access point by making a call to the GET /baseUris endpoint -

https://api.na1.echosign.com/api/rest/v6/baseUris

The response of the above call would look something like this

{
  "apiAccessPoint": "https://api.na2.echosign.com/",
  "webAccessPoint": "https://secure.na2.echosign.com/"
}

Then use the above-obtained apiAccessPoint to make an API call to create a new webhook with an appropriate request body.

<apiAccessPoint>api/rest/v6/webhooks
For example - https://api.na2.echosign.com/api/rest/v6/webhooks

You can also refer to the Adobe Sign API documentation.

Vishwas
  • 506
  • 1
  • 5
  • 20