Articles in this section

Resolving 401 Unauthorized error with BoldSign API

Published:

When a user tries to access the BoldSign API endpoint using a generated API key, they may encounter a “401 Unauthorized” error.

Cause

A 401 Unauthorized error typically occurs when:

  • The API request is sent to a regional endpoint that does not match your BoldSign account’s data center.
  • The API key is missing or incorrectly included in the request header.
  • An OAuth access token has expired.
  • The API key is invalid, deleted, or inactive.

Solution

1. Verify your Regional API Endpoint

BoldSign accounts are hosted in specific regional data centers. Your API requests must be sent to the endpoint that corresponds to your account’s region. Using an endpoint from a different region will result in a 401 Unauthorized error.

Use the appropriate base URL based on your account region:

Region Base URL
United States (US) https://api.boldsign.com/v1
Europe (EU) https://api-eu.boldsign.com/v1
Canada (CA) https://api-ca.boldsign.com/v1
Australia (AU) https://api-au.boldsign.com/v1

For example, if your BoldSign account is hosted in the Canadian data center, all API requests should use: https://api-ca.boldsign.com/v1

2. Verify the API Key Header

When using API key authentication, ensure that your API key is included in the X-API-KEY request header.

headers: {
'X-API-KEY': '<your_api_key>'
} 

3. Validate the API Key

Ensure that the API key:

  • Is valid and active.
  • Has not been deleted or regenerated.
  • Belongs to the correct BoldSign account.
  • Is being passed without extra spaces or invalid characters.

4. Check OAuth token expiration

If you are using OAuth authentication instead of an API key, verify that the access token has not expired. OAuth access tokens typically expire after one hour, after which a new token must be generated.

Refer to documentation

For detailed authentication and API usage information, refer to our API documentation, Versioning - API Documentation - BoldSign.

If the issue persists

If you continue to experience a 401 Unauthorized error after completing the above checks, contact our BoldSign Support team at [email protected] or create a support ticket for further assistance.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied