We have all code working in the Sandbox. We have completing all the steps to move to production successfully at Docusign. Docusign Rest API is returning a blank response after moving into production environment (same code works fine in Sandbox)
After Purchasing 'Basic API' Plan with Docusign we are attempting to use same curl scripts that were working fine in Sandbox environment in Production. Used GetUserInfo to determine the base URI (ca.docusign.net), tried restapi/v2/ , restapi/v2.1/ and also tried without specifying a version, always get a blank response (unless we send an invalid bearer token, see #3 below). Production Token string seems to be fine as GetUserInfo works in production and no authorization errors.
1) Sandbox (works fine, API returns an Envelope ID): curl --header "Authorization: Bearer [TokenTextString]" --header "Content-Type: application/json" --data-binary @JsonReq.txt --request POST https://demo.docusign.net/restapi/v2/accounts/[account_id]/envelopes -k { "envelopeId": "6e1aa70d-cc9e-4a57-a371-1deed8e49424", "uri": "/envelopes/6e1aa70d-cc9e-4a57-a371-1deed8e49424", "statusDateTime": "2020-01-14T15:32:38.9230000Z", "status": "sent" }
2) Production Environment (Get Blank Response): curl --header "Authorization: Bearer [TokenTextString]" --header "Content-Type: application/json" --data-binary @T:\at\oct2017!docusign\JsonReq.txt --request POST https://ca.docusign.net/restapi/v2/accounts/[account_id]/envelopes -k
3) Interestingly If I change the bearer token to something invalid (ie remove the leading 'e') I get a response "USER_AUTHENTICATION_FAILED":
curl --header "Authorization: Bearer [TokenTextString_e_removed]" --header "Content-Type: application/json" --data-binary @T:\at\oct2017!docusign\JsonReq.txt --request POST https://ca.docusign.net/restapi/v2/accounts/[account_id]/envelopes -k { "errorCode": "USER_AUTHENTICATION_FAILED", "message": "One or both of Username and Password are invalid. Invalid access token" }
Note: used the userinfo request to get the Base URI for the Production RestAPI (ca.docusign.net)
curl --header "Authorization: Bearer [TokenTextString]" --request GET https://account.docusign.com/oauth/userinfo -k {"sub":"21219113-31d7-427d-bdad-16dab4654485","name":"XXXX XXXX","given_name":"XXXX","family_name":"xxxx","created":"2019-12-10T22:18:51.623","email": "[email protected]","accounts":[{"account_id":"[account_id]","is_default":true,"account_name":"XXXXXX Inc","base_uri":"https://ca.docusign.net"}]}