Create a channel within matlab | MATLAB IoT Analytics | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

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
Create a channel within matlab
No permission to create posts
July 18, 2016
3:34 pm
Avatar
jemapel
New Member
Members
Forum Posts: 4
Member Since:
October 23, 2014
sp_UserOfflineSmall Offline

Is this possible? I'm able to do so outside of Matlab by sending a POST request to 

But I'd like to do so within Matlab so I'm seeking another method. 

July 18, 2016
4:56 pm
Avatar
jvasudev

MathWorks
Members
Forum Posts: 13
Member Since:
April 29, 2016
sp_UserOfflineSmall Offline

Hi ,

 

You can use the following MATLAB code as a template to send a POST request to create a channel from within MATLAB, 

UserApiKey = 'xxxxxxxxx'; % This is your account API key found on the Account -> My Account Page
url = 'https://api.thingspeak.com/channels.json'; 
data = ['api_key=',UserApiKey, '&name=test channel']; % These are the parameters for the POST request
response = webwrite(url,data) % Using webwrite command to send a POST request

 

You can visit the https://www.mathworks.com/help/thingspeak/queue-commands-using-the-talkback-app-from-matlab.html for an example as how to use MATLAB commands to send GET and POST requests. 

 

Forum Timezone: America/New_York

Most Users Ever Online: 166

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

kusmumichael, petersmith99, Rambant, blakeharriss09, optisol, Niyonzima Fils

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457