Hi

Can I add in the ''API key'' and ''Field1=1'' as shown in the code below?

 

/**

* POST_REQUEST_CUSTOM_HEADER_0 is a custom header which is sent along with the

* POST request. It's meant to demonstrate how to use custom header.

*/

 

#define POST_REQUEST_CUSTOM_HEADER_0 "H2XL7UF32O1T2V3Y"

 

/**

* POST_REQUEST_CUSTOM_HEADER_1 is a custom header which is sent along with the

* POST request. It's meant to demonstrate how to use custom header.

*/

#define POST_REQUEST_CUSTOM_HEADER_1 "field1=1"

0 (0 Stimmen)
RE: Setting Thingspeak key API and Field in HTTP request
Antwort
15.04.19 14:05 als Antwort auf l Kent.

Hi l Kent,

In HTTP payload format, custom headers carry additonal information. You can use POST_REQUEST_CUSTOM_HEADER_0  only for passing the API key( with prefix "X-AuthToken: ").  Consider generating authentication token for your API key as mentioned in article https://docs.openstack.org/zaqar/latest/user/authentication_tokens.html.

Thanks,

Padmapriya.

 

0 (0 Stimmen)
RE: Setting Thingspeak key API and Field in HTTP request
Antwort
20.04.19 11:23 als Antwort auf Padmapriya G.
This means that I just need to insert the API key in "POST_REQUEST_CUSTOM_HEADER_0 " ?Thank you
0 (0 Stimmen)