How to enter API KEY in maxmsp?

Jungoo Jung's icon

I want to get the API of the site that tells the world's electricity consumption and create a project. I got the site link and API Key, and I found out that I can use maxurl through YouTube and forums, so I actually applied it, but I don't know how to input API Key into Header in Max8. Use Dictionary... I tried various methods, but it was a problem that could not be solved at my knowledge level.

The API was obtained from the site.

https://www.electricitymaps.com
https://static.electricitymaps.com/api/docs/index.html

It may not be helpful, but I will attach the patch I made so far.

Please help me:-(

Elec.zip
zip 2.86 KB

pol olory's icon

API connect.maxpat
Max Patch

hi jungoo... here is my solution. I hope it will help !

Jungoo Jung's icon

There is no JavaScript file in the patch file. I want to know how to apply the API key