Other Apis - Espressif Systems ESP8266 Beginner's Manual

Hide thumbs Also See for ESP8266:
Table of Contents

Advertisement

Encoding your login credentials
To get access to the feed, you have to enter your email address and password. You can't send them as plain text, you have to encode
them to base64 first. Use the following command in a terminal (Linux & Mac):
echo -n "email.address@gmail.com:password" | base64
Then add it to line 15 of the sketch. For example:
const char* credentials = "ZW1haWwuYWRkcmVzc0BnbWFpbC5jb206cGFzc3dvcmQ=";
Other APIs
Many services send their data in JSON format. If you just need one piece of information, you may be able to use the same approach of
scanning the entire JSON text for a certain word, but it's much easier to use a JSON parser, like the ArduinoJson library. It will
deserialize the JSON text, and create a JSON object, you could compare it to an associative array. You can browse the entire tree
structure, and easily find the data you're looking for.
The downside is that it uses more memory.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP8266 and is the answer not in the manual?

Questions and answers

Table of Contents