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 Votes)
RE: Setting Thingspeak key API and Field in HTTP request
Answer
4/15/19 2:05 PM as a reply to 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 Votes)
RE: Setting Thingspeak key API and Field in HTTP request
Answer
4/20/19 11:23 AM as a reply to Padmapriya G.
This means that I just need to insert the API key in "POST_REQUEST_CUSTOM_HEADER_0 " ?Thank you
0 (0 Votes)