Topic or Problem Statement
API key is not valid error.
Root Cause or Use Case
The user got an error {"error_message":"We can't find that Stack. Please try again.","error_code":109,"errors":{"api_key":["is not valid."]}} while making a CDA call.
Prerequisites to Resolve
-
Access to the stack API key and the delivery token.
Steps to Resolve
There could be two possible reasons of this error.
1. The stack API key is not correct.
2. The base URL is not correct.
Please verify the base URL if the API key is correct. Content Delivery API Base URLs:
For US region: https://cdn.contentstack.io/
For European region: https://eu-cdn.contentstack.com/
Below are the base URL for CMA:
For US region: https://api.contentstack.io/
For European region: https://eu-api.contentstack.com/"
Related Questions or Symptoms
-
While making an API request to contentstack I get an error the API key is not valid, I checked and the stack API key and this is correct.
Other Helpful Resources
-
To view the stack API key you can refer to the steps given in the guide here: https://www.contentstack.com/docs/developers/set-up-stack/view-stack-details/
-
For the base URLs you can refer to the below links: