Hi I am new to Docusign integration to salesforce. I have to change the status of envelope to "Correction" and I have gone through "POST" method provided in the Docusign RestAPI guide.
Doing so, the docusign returns a correction url to activate the correction status. As of now, I am manually pasting that url in the browser to activate correction view.
My question is, how to hit that URL to browser in background through Apex in-order to activate the correction status? (or) Is there anyway to activate correction view of envelope other than hitting URL to browser?
I have tried using HTTP get requests to run that URL . The first request will redirect to another link with status code 302 ("Found"), if i use another request on that using reponse.getHeader('Location') it is redirecting to member login page, (So i have passed another request to login which responded as Status "OK"), if i hit another request on member login page response.getheader('Location') the response of this latest request is "OK"(because i have already logged in using the previous request) and response.getHeader('Location') for this latest request is null and Status of envelope is not changed to "correction".
I know using these many requests is not at all a best practice, could anyone suggest me a perfect way to activate the correction view of envelope? I am in real need of this answer. Please help. Thanks.
The correction view is possible but you have to authenticate your web service request in order to get to it. You can't just find a URL and go to it without authentication - that would violate the security of the transaction.
You can get the correction view URL by doing a POST here
https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/views/correct
You would also need to provide these headers:
X-DocuSign-Authentication: <DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
Accept: application/json
Content-Type: application/json
Related
Good day
I have created an endpoint to use the Create Quote action on the Opportunities page. When I sent the POST to the Action I get a 202 response but the Quote is never made. I believe it is because I am only "clicking" the Create New Quote and not the Create button(or Create and Review) on the Dialog box?
Is this a limitation on the REST API? because in the Wiki they do take about the Pop-up Panels with the SOAP connection:
https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=0ff94cd6-a46e-4cf7-8b97-51b79a6b3257
The 202 response only means that the action was accepted and is in progress.
In order to see the actual result you will need to perform a GET on the URL in the Location header of the response
You can find more information about this here :
https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=91bf9106-062a-47a8-be1f-b48517a54324
Check the Response and Status Code sections
Is it possible to edit the webhook url after the envelope has already been created?
During the envelope creation I create the webhook url using:
$event_notification = new \DocuSign\eSign\Model\EventNotification();
$event_notification->setUrl("https://mywebhooks.com/docusign/index.php");
$envelope_definition = new DocuSign\eSign\Model\EnvelopeDefinition();
$envelope_definition->setEventNotification($event_notification);
Everything works and it's hitting the url as expected.
However, recently we have added authentication to our webhook url and want to add a GET param to the url so we can validate it when we get hit by this call.
So the updated URL is set to $event_notification->setUrl("https://mywebhooks.com/docusign/index.php?api_key=docusign_webhook_key"); but now the old envelopes that have already been created without this param will hit our system and not get authenticated because it's missing the param.
Is there any way to update the URL's of the already created envelopes?
(There is a way to hardcode the webhook url in the console - https://support.docusign.com/en/guides/ndse-admin-guide-custom-connect-configuration-htm. That works fine when i add it there. But it then gets hits twice and will cause failures on our end.)
No, it looks like in-flight envelopes cannot have their EventNotifications changed.
I've set up a ZAP so that when a subscriber is added to my aweber email list they are automatically added to a product in my membership plugin called DAP or digital access pass.
As per the instructions of the membership plugins developers, I am using a webhook in the zapier 'post' section.
It's not working. Quite simply the webhook doesn't appear to be calling anything.
Now, weird thing is that zapier logs show the webhook has been sent and has had success. But from DAP's end nothing is being received.
The support team at DAP tell me that the script isn't being called, because nothing appears in their logs.
They show me this by putting the webhook URL into a browser and calling it that way, and THEN the relevant info arrives in the DAP logs.
Zapier told me they do not trouble shoot and so advised that I post here.
Would appreciate any help. Thank you very much.
Dan
You can easily test if Zapier is making a call or not by sending the request to http://requestb.in
Steps:
Create a request bin and copy the URL.
Request bin screenshot
In Zapier, replace the webhooks post URL with the requestb.in URL.
Now, whenever the Webhook makes a post request, you should be able to visit the inspect page of your bin and check if a request was received. Just add ?inspect to the end of the URL. For example, if your Request bin URL is https://requestb.in/wbto8jwb then you should visit https://requestb.in/wbto8jwb?inspect
The inspect page will show all the requests received.
With this, you will know if Zapier is sending the requests. If the requests are being received by request bin then there is something which needs to be fixed by DAP.
Note that it could also be something in the configuration of the Webhook that is causing the request to not be recognised by DAP. It will help if you add more details to your question - what format is the DAP team expecting to receive the data in?
Below is a sample Webhook implementation in Zapier.
I have added a hook to POST data to a request bin (https://requestb.in/wbto8jwb)
Webhook POST screenshot
When I test this step, the request is received in the Request Bin Inspect page (https://requestb.in/wbto8jwb?inspect).
Request Bin Screenshot
More reading:
https://zapier.com/help/webhooks/
Update:
You can also make a direct call to the DAP API by using a tool like https://www.hurl.it/. From the drop down in destination, select POST and put the URL here. Click on Add body and paste the raw data from request bin. Now ask the DAP team to check if the request was received.
I have a link on my page that redirects to another page but the request is sent through POST method. Now when the user refreshes the new page the request is sent through GET method. The URL is just used to display a page. My question is, is it advisable to use both POST and GET for the same URL call or will it cause problems related to security or any other? If so please do explain how.
No. Use POST if the link is executing an unsafe action (e.g. logout, change password) or it is sending sensitive data you do not want displayed in the URL (URLs are logged by default in the browser history and by many appliances, proxies and web servers). POST can also be used when a large amount of information is to be sent.
Otherwise use GET.
I am trying to setup a Google sandbox payment system and all is fine up until Google tries to send data to my system and then comes back with the following warning message:
Unfortunately, we could not confirm your purchase with the merchant's server. Your order has been canceled. Please contact the merchant if this problem continues.
I see that Google tried to contact my server:
[22/Sep/2014:14:05:18 -0400] "POST /walletresponse/purchase HTTP/1.1" 301 657 "-" "Google-In-App-Payments; (+http://www.google.com/payments)" 20255
Looking in the chrome->console->network->preview I see the JWT token which works if manually sent to the site. Any ideas on how to debug this?
You'll need to debug server-side and check if you are responding correctly to the postback (within 10 seconds). If you send it manually, what is the response of/from your server?
Important: If you specify a postback URL, your server must respond promptly and correctly to the HTTP POST messages that Google sends for each transaction. Otherwise, the transaction will be canceled.
Responding to the postback
Your server must send a 200 OK response for each HTTP POST message that Google sends to your postback URL. To send this response, your server must:
Decode the JWT that's specified in the jwt parameter of the POST message.
Check to make sure that the order is OK.
Get the value of the JWT's "orderId" field.
Send a 200 OK response that has only one thing in the body: the "orderId" value you got in step 3.
Hth...
Googles servers came back online and now it seems to be working