Using Multiple API keys for RESTful Sensors

Hello all,

I would like to send RESTful commands to two devices on my local network. The devices are two different servers with two different API keys. I have solved the issue of different URLs by sending the device URL as part of the data in the action when it is called.

So, what is the best way to handle the multiple API Keys? My thoughts so far:

  1. Make both of the API keys the same on the devices I am controlling. This does not seem like the best solution, but it should work.
  2. Pass the API key in the data with the action call. This seems like it would be cumbersome keeping up with the API keys and putting them in the action calls.

Does anyone have any other ideas on how to do this?

Any help would be greatly appreciated.

Thanks in advance.

same key + put key in secrets and use !api_key instead of a looooonnngggg key.