URL API Write Key will not update Channel Settings for Latitude, Longitude or Altitude | ThingSpeak API | 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
URL API Write Key will not update Channel Settings for Latitude, Longitude or Altitude
No permission to create posts
October 4, 2019
5:33 pm
Avatar
jblaha
New Member
Members
Forum Posts: 1
Member Since:
October 4, 2019
sp_UserOfflineSmall Offline

How can one update the latitude and longitude using the channel write API key using a text URL?

Attempting to do a URL based Location update such as:
https://api.thingspeak.com/update.json?api_key=A7S1W5I1DETDG9N6&latitude=40.575083&longituyde=-122.1234&elevation=123&location=true&status=true
SERVER RESPONSE: [Response looks good]
{"channel_id":862111,"created_at":"2019-10-{"channel_id":862612,"created_at":"2019-10-04T21:26:59Z","entry_id":37912,"field1":null,"field2":null,"field3":null,"field4":null,"field5":null,"field6":null,"field7":null,"field8":null,"latitude":40.575083,"longitude":-122.1234,"elevation":"123","status":"true"}

Attempting with a non JSON URL API write such as:
https://api.thingspeak.com/update?api_key=A7S1W5I1DETDG9N6&latitude=40.575083&longituyde=-122.1234&elevation=123&location=true&status=true
SERVER RESPONSE: [Response looks good]
37889 (Increments every update and looks successful from the server side)

However, nothing is ever changed under the channel location 🙁

The Latitude and Longitude still show null when API Read key is used for position:
https://api.thingspeak.com/channels/862111/feeds.json?results=2&location=true
SERVER RESPONSE: (Very Sad Panda)
04T21:20:04Z","entry_id":37896,"field1":"1016.69","field2":"1016.69","field3":"30.25","field4":"19.92","field5":"1122.2","field6":"90.12","field7":"-4.16","field8":"25.81","latitude":null,"longitude":null,"elevation":null}]}

How can one update the latitude and longitude using the channel write API key and actually get the sever to keep it?

Thanks.

October 8, 2019
4:38 pm
Avatar
cstapels
Moderator
Members


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

One thing I noticed was that you spelled Longitude incorrectly. This may cause the location part of the request to fail entirely.

Also for the write API, location=true and status=true are not a valid parameters. They are for the read API.
https://www.mathworks.com/help/thingspeak/writedata.html
https://www.mathworks.com/help/thingspeak/readdata.html

Is there data in your channel? I tried to read it but your channel is set as private.

Last, "channel Location" is not part of the feeds for the channel, its in the channel information. The channel and feeds have different location information. YOu can uupdate the channel location with the write settings API.
https://www.mathworks.com/help/thingspeak/writesettings.html

To update the feeds location, use the write data API listed above.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
20 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:

qkpham, SANGAMNATH B, swatiiot, kalyanigaware16@gmail.com, Romi, Drakan01

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457