CORS error responses
When a single-page application (SPA) API request to Docusign cannot be processed, Docusign returns a 403 Forbidden or 400 Bad Request error response. An error response is returned if any of the following is true:
-
App configuration issues
- The domain where the script is hosted is not one of the allowed origins for the app.
- The request did not use one of the allowed HTTP methods for the app.
- The cors scope was not specified during authentication.
- The request did not include an OAuth access token.
- The request is not compatible with eSignature REST API v.2.1.
- The API endpoint path did not include /accounts/{account_id}.
-
Account setting issue
The authenticated user’s account does not have CORS enabled for the app.
Your app’s error message for this issue should instruct the user to ask their account administrator to enable CORS for the app. This message is appropriate because the other possible error causes would occur during development, not in a production environment.
Additional error details
For some error conditions, the 403 Forbidden or 400 Bad Request response is accompanied by detailed error codes and messages. If available, these details appear in the Developer Tools for the browser in which the SPA is running. To see error details, follow these general steps for commonly used browsers, although the exact steps may vary depending on the browser:
- Launch the browser’s Developer Tools.
- Select the Network panel.
- In the list of API requests, select the request that received the error response.
- Display the Response tab to see the error code and message.
This is an example CORS error response displayed in Firefox.

General errors
This table lists CORS error codes and messages you may see in the browser’s Developer Tools when a 403 Forbidden response is returned, as well as troubleshooting guidance.
Public Authorization Code Grant errors
These errors can occur when an SPA authenticates using Public Authorization Code Grant. They will appear in the browser’s Developer Tools when a 400 Bad Request response is returned.