Invalid api_key

Hey…,
I have been trying to work on the python platform and i have already installed all the bolt python libraries. But when i run my initial code to check the status of my bolt
{value:“invalid API-key”, susses:“0”}
I have tried cross checking my api key from my cloud credentials but the key is entered right.
How do i fix this?

Hello @urvashi.taki42, please check your API key and re-write it again. Also make sure that you have enabled your API key on your Bolt Cloud account. To use the API key it should be enabled first. If the problem still persists then try to generate a new API key and use it in your code. But remember that your old codes won’t work with your new API key. So you need to update your old codes wherever you have used an API key with your new API key.
Thank you

Hello,

api_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [wrong way]
api_key = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX [correct way]

Confirm and Recheck your API Key with the original one present in the Bolt IoT Dashboard.
Also, you have to enter the API key with the dashes(-) as given in the dashboard. So please check that you have included the dashes(-) properly.

And also device_id = “BOLTXXXXXXX” (correct format of writing device id)
now TRY AGAIN.
Capture
Hopefully, it works.

Thanks !!!

Same problem occurred with me I tried this make sure that you enabled the API key and thereafter copy that as it as in the same format that’ll surely work.

go to bolt cloud and enable api key then generate api key then see that api key and then copy or write exact api key which is shown in bolt cloud then write where ever it is required