Solved

Kindly provide valid parameters

  • 29 September 2022
  • 2 replies
  • 52 views

Userlevel 3
Badge

Hi there,

We are using the Javascript SDK for the Contentstack delivery API. We are instantiating our Stack the same way the documentation says we are supposed to, but we still get a “Kindly provide valid parameters” wherever we use the call.

Any insight would be appreciated.

 

const Stack = contentstack.Stack({
api_key: process.env.CONTENTSTACK_API_KEY,
delivery_token: process.env.CONTENTSTACK_DELIVERY_TOKEN,
environment: process.env.CONTENTSTACK_ENVIRONMENT,
region: process.env.CONTENTSTACK_REGION ? process.env.CONTENTSTACK_REGION : 'us',
branch: process.env.CONTENTSTACK_BRANCH ?? 'main'
});

 

Thanks

icon

Best answer by Sachin 30 September 2022, 15:48

View original

2 replies

Userlevel 2

Hi @Tyler , we checked this with our team and it seems that the issue may arise due to env file is not configured properly with the token. Could you please try to log the API key and Delivery token once and let us know if it fetches the correct value.

Regards,

Sachin.

Userlevel 3
Badge

Hi @Sachin, That cannot be correct as I can still access the API using those keys and receiving information back correctly. I’ve emailed contentstack support team and it appears there is a bug on their end that they are looking into.

Reply