How to send URL Parameters with ThingHTTP? | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
How to send URL Parameters with ThingHTTP?
No permission to create posts
June 17, 2019
3:47 pm
Avatar
AndreasW
New Member
Members
Forum Posts: 2
Member Since:
June 17, 2019
sp_UserOfflineSmall Offline

Hi there!

To send data to an external REST API, I need to create the following URL:

https://somewebsite.com/api.json?key=123&value1=22&valueb=99

whereas actually it should read like

https://somewebsite.com/api.json?key=123&value1=%%channelxxxx_field1%%&valueb=%%channelxxxx_field2%%

Now my question is - how do I do that? When I try to enter the URL as above, ThingHTTP tells me I must enter a valid URL. If I add those as a header parameters, obiously the value are in the header but not in the URL. The same goes for the body.

What am I doing wrong?

This is so obvious and easy, there must be a way surely, right?!

Thanks
Andreas

June 19, 2019
8:26 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 861
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

I would recommend you use a MATLAB analysis to build the URL, and then webwrite() to trigger the action.
I will look into the replacement keys in the ThingHTTP body, I was also having some trouble with them recently.

June 19, 2019
4:14 pm
Avatar
AndreasW
New Member
Members
Forum Posts: 2
Member Since:
June 17, 2019
sp_UserOfflineSmall Offline

cstapels said

I would recommend you use a MATLAB analysis to build the URL, and then webwrite() to trigger the action.
I will look into the replacement keys in the ThingHTTP body, I was also having some trouble with them recently.  

Hi cstapels,

thanks for your reply!

This sounds very complicated to me for such an easy thing 🙂 As a newbie, for me this feature is so obvious, that I could not believe it is not working.

At the moment I found a workaround via IFTTT - I just send the data via json in the body and IFTTT then makes the webhook URL with the parameters in the URL out of the JSON, but obviously in an ideal world this step would be unnecessary.

Thanks
Andreas

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

briskpanda, Dejw0089, Yassine Ben Salah, anis, 43994554AKS, suda

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457