From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

MYRIO 1900 - Execute URL or get API

I've project using myRIO 1900. 

I need to open an URL or API like a gateway to send an SMS to mobile phone.

the URL is like http://www.sendsms.com/send.php?recv=+60123456789&msg=Hello World

 

I already try using HTTP Put but it not working.

here the diagram i used:

Screen Shot 12-11-17 at 08.53 PM.PNG

anyone can help me?? Thank you in advanced.....

0 Kudos
Message 1 of 4
(2,756 Views)

I would recommend checking with the provider here (sendsms.com) for the webapi (URIs and methods, e.g. GET vs. POST).

0 Kudos
Message 2 of 4
(2,732 Views)

 

the webapi was working well...

when i manually enter on browser, i'll get the SMS on my number...

The problem is on LABVIEW. the API link can't execute automatically from Labview.

Thank you for reply..

0 Kudos
Message 3 of 4
(2,723 Views)

The LV code snippet you show is using the HTTP PUT method, however the URI that you're encoding, and the normal method used by plugging a URL into a browser, is using the HTTP GET method. To use HTTP PUT, you'd need to construct a document or form to submit to the server, but it seems that this is not the way that the web API is setup to work (instead, using query strings to tell the server how to field the request).

 

Check with the service provider to see what interaction method that their web API supports.

0 Kudos
Message 4 of 4
(2,690 Views)