Rest Weather API JWT generation on Arduino/Esp32

Hi there,

I'm looking to get information about current weather conditions on ESP32 microcontroller but can't properly generate JWT token. Is there a way to generate JWT token on ESP32 it self? I can't find any library that is capable of doing it. Yet I found some libraries related to Google Cloud IoT, tried to port them to be able to connect to Apple Weather REST but generated JWT is not compatible.

Any help is highly appreciated. Thank you

I hope it will help:

  1. Create a ruby file on your Mac using any code editor (For example: JWT.rb)
  2. Example of the code inside this file:

3. Run this file in Terminal using: ruby + file name (ruby JWT.rb) 4. You will see a token in Terminal.

If the token is not made then try this:

  1. Open the root directory of Mac in Terminal and print:
  2. export GEM_HOME="$HOME/. gem"
  3. gem install rails
  4. gem install ruby
  5. Try again the 3 paragraph (Run this file in Terminal using: ruby + file name (ruby JWT.rb))

Good luck :)

Rest Weather API JWT generation on Arduino/Esp32
 
 
Q