Guest User

Untitled

a guest
Jan 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. https://secure.na1.echosign.com/public/docs/restapi/v6#!/webhooks/createWebhook
  2.  
  3. {
  4. "name": "agreement history",
  5. "scope": "USER",
  6. "state": "ACTIVE",
  7. "webhookSubscriptionEvents": [
  8. "AGREEMENT_CREATED"
  9. ],
  10. "webhookUrlInfo": {
  11. "url": "MY_SITE_URL_TO_GET_WEBHOOK_EVENT_RESPONSE.php"
  12. }
  13. }
  14.  
  15. <?php
  16.  
  17. $headers =array();
  18. foreach (getallheaders() as $name => $value) {
  19. $headers[$name] = $value;
  20. }
  21.  
  22. $myfile = "webhookResponse.txt";
  23. $fh = fopen($myfile, 'a');
  24. fwrite($fh, $_POST."n");
  25. fclose($fh);
  26.  
  27. http_response_code(200);
  28. return json_encode(["xAdobeSignClientId" => $headers["X-AdobeSign-ClientId"]]);
  29. ?>
  30.  
  31. {
  32. "code": "INVALID_API_ACCESS_POINT",
  33. "message": "Request must be made to correct API access point (e.g. use GET /baseUris)."
  34. }
Add Comment
Please, Sign In to add comment