How to solve for an API key is not valid error.

  • 11 May 2022
  • 1 reply
  • 477 views

Userlevel 1

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

  1. 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


1 reply

Badge

I’ve had this problem and couldn’t figure out the solution through this entry alone. Upon talking to another colleague, I was advised to use the Contentstack Postman instead which proved to be effective. Leaving this infomation here in case it might be useful to another person:

https://www.contentstack.com/docs/developers/apis/postman-collections/

Reply