Collaborative help request for oAuth2 access to DocuSign

Sean Cole (Pi) sean at pidigital.co.uk
Wed Jun 9 14:04:14 EDT 2021


Hi All,

Until now I have been using SOAP to connect to Docusign without the need
for oAuth2. However, they will soon (August 16th, 2021) require oAuth2
entry.

To make it easier for us to play together, I've created a temp gmail and
DocuSign account. The code I'm using is as follows:

//
local sDocuSignAuth
on es_DocuSignTest
   put "http://account-d.docusign.com/oauth/auth" into tAuthURL -- //
account-d DURING TESTING / account WHEN LIVE //
   put "http://account-d.docusign.com/oauth/token" into tTokenURL
   put "e36917d4-72be-4924-aced-3e75844080a2" into tClientID // LCTest
   put "0493edd9-a8a6-431e-a64e-2d6f162ca98b" into tClientSecret // LCTest
   put "signature" into tScopes
   put "58081" into tPort // Redirect uri set to 'http://127.0.0.1:58081'
   put "code" into tParamsA["response_type"]
   --
   put "pi.lc.apitest at gmail.com" into tUser // Docusign test account
   put "lctestaccount" into tPass // Docusign test account
   --
   if sDocuSignAuth is empty then
      OAuth2 tAuthURL, tTokenURL, tClientID, tClientSecret, tScopes,
"58081", tParamsA
      put the result &cr& it
      if the result is not empty then
         return "Not authorized!" for error
      else
         put it into sDocuSignAuth
      end if
   end if
end es_DocuSignTest
//

You can log in to the DocuSign account using those credentials if you feel
the need.

As you will find when you try the code, the oAuth window comes up, you log
in, but it never responds with the Token or the redirect uri. So I don't
know what I'm missing or how to fix it. Perhaps by getting this one sorted
out we can have a definitive method for any API.

Thanks for any help.

Sean



More information about the use-livecode mailing list