I have written both the codes for as well as
whenever i execute the code, i get an error invalid literal for int() with base 10: “Invalid API key”
i even tried to reset my API and retired as mentioned in this question posted earlier(In project 9(Sending an SMS when Temperature Crosses Threshold))
Still the error persists.Capture

Did you use the correct syntax while writing the file. If you’ve mentioned the api key without the double-inverted commas then such an error could happen.
If you can provide your code (hide your api key and device id) we can have a better look at the problem.

Thankyou for your reply. API key has already been mentioned in double inverted commas, i even tried single inverted commas but the same error persists.
I have attached the code snap for your further pursual.

here is the file snap

Your code is correct.This could also occur if the and file aren’t in the same folder. If they are in the same folder I can only advise to create the from scratch again with a new API key and just to be sure also check other parameters like SID and AUTH_Token.
I’ll try and tweak your code to see if any changes can do the trick.

Hi @rishinaik09,

The error “Invalid API Key” is an error that the Bolt Cloud sends back to your code.
This means that the API key that you have entered in the conf file is incorrect.
Please go to the API tab on the Bolt Cloud, and compare the API key from your conf file to the one in the API tab.

please go through the question. I have already crosschecked API. Still the problem persists.

the files are in same folder. I will try to create new file and will update soon.

Hi @rishinaik09,

If you are getting the error “Invalid API Key”, it is either an issue with wrong API key, or the formatting of the API key. You need not look anywhere other than the config file for the details of the API key variable, or it’s formatting, or when the API key has not been enabled on the API tab on the Bolt Cloud.

Nothing else will give you this kind of an error.