Morning,
in my team we are trying to implement an integration with DocuSign and according to the documentation, we need to setup an OAuth process. In order to do so, the steps we’ve followed are:
- Create a developer account
- Go to “Integrations” → “Apps and Keys” and create an app there with a secret key and also the redirect URIs and CORS configuration. As it is the first try, we used “http://localhost:3000” everywhere.
- We followed this link from the documentation: https://developers.docusign.com/platform/auth/authcode/confidential-authcode-get-token/
- We’ve implemented a redirection from our frontend to get an authCode as stated in the documentation by calling https://account-d.docusign.com/oauth/auth with response_type=code,scope=signature cors,client_id={OUR_CLIENT_ID} and redirect_uri=http://localhost:3000
- Afterwards, we are doing a POST request through axios to https://account-d.docusign.com/oauth with the parameters stated in the documentation (a header with Authorization: Basic {COMBINED TOKENS} and a body with { grant_type: ‘authorization_code’ and code: the retrieved code }.
- In this whole flow, we are getting the auth code, but when trying to exchange it for an access code inmediately after, we are getting an 400 BAD REQUEST with {"error":"invalid_grant","error_description":"unexpected_origin_included"}
Anyone has any tip on how to proceed? We didn’t find this error anywhere in the documentation and are a bit stuck with the topic.