Using the HTTP/HTTPS Api The HTTP API allows you to send and receive requests from any service or DIY Smart Project to iotBind platform.
When issuing a HTTP request, your request must be signed with Device API secret key , and include the request parameters and using the HTTP methods GET OR POST.
the base URL for API version 1.0 is : http://api.iotbind.com/v1/  

To generate a API key , click on the key icon After adding the device And Click on the refresh icon To generate a new key Any time.

URL API : http://api.iotbind.com/v1/switch.php

ParameterValueDescription
method"POST" or "GET" For How you want to send data ,Only Value "post" or "get"Always use it 
uidDevice UniqueIDAlways use it
keyEncrypted keyDevice API secret keyAlways use it 
cmdOne of these:"on""off""get""ping"only use one of these commands when you send a requests to iotbind"on" If you want to send on Command to Device"off" If you want to send off Command to Device"get" If you want get all device data frome iotBind platform"ping" If you want send ping Command to iotBind platform to learn that the device is connected
data1Text or numbers(optional) Use it only for update data1
data2Text or numbers(optional) Use it only for update data2
data3Text or numbers(optional) Use it only for update data3

Example: if you need to send "on" command and Update data1,data2,data3 by URL link "GET method":

url
http://api.iotbind.com/v1/switch.php?method=get&key={DeviceKay}&uid={UniqueID}&cmd=on&data1={Anything}&data2={Anything}&data3={Anything}

replace:
{DeviceKay} = API Device Kay
{UniqueID} = Device UniqueID
{Anything} = any Data you need

Output json Data :

  

json
{"MESSAGE":"UPDATED"}

* data1,data2,data3 is an optional if you need to update data  

Example: if you need to get switch data by "GET method":

http://api.iotbind.com/v1/switch.php?method=get&key={DeviceKay}&uid={UniqueID}&cmd=get

replace:
{DeviceKay} = API Device Kay
{UniqueID} = Device UniqueID  

Output json Data :

  

json
{
    "uid": "UniqueID",
    "name": "DeviceName",
    "type": "RGB Light",
    "cmd": "on",
    "data1": "Anything",
    "data1_unit": "Anything",
    "data2": "Anything",
    "data2_unit": "Anything",
    "data3": "Anything",
     "data3_unit": "Anything"
}

Example for send "off" command and Update data1,data2,data3 by URL link "POST method":

http://api.iotbind.com/v1/switch.php

Send POST data with request:

method=post

uid=UniqueID

key=DeviceKay

cmd=off

data1=Anything

data2=Anything

data3=Anything

Output json Data :  

sql
{"MESSAGE":"UPDATED"}

* data1,data2,data3 is an optional if you need to update data  


Example: if you need to get switch data by "POST method:  

http://api.iotbind.com/v1/switch.php  

Send POST data with request:

method=post

uid=UniqueID

key=DeviceKay

cmd=get

Output json Data :

  

json
{
    "uid": "UniqueID",
    "name": "DeviceName",
    "type": "RGB Light",
    "cmd": "on",
    "data1": "Anything",
    "data1_unit": "Anything",
    "data2": "Anything",
    "data2_unit": "Anything",
    "data3": "Anything",
    "data3_unit": "Anything"
}

If you want send "ping" Command to iotBind platform to learn that the device is connected by URL link "POST method":  

http://api.iotbind.com/v1/switch.php  

Send POST data with request:

method=post

uid=UniqueID

key=DeviceKay

cmd=ping

Output json Data :  

json
{"MESSAGE":"PING OK"}

If you want send "ping" Command to iotBind platform to learn that the device is connected by URL link "GET method":
http://api.iotbind.com/v1/switch.php?method=get&key={DeviceKay}&uid={UniqueID}&cmd=ping
replace:
{DeviceKay} = API Device Kay
{UniqueID} = Device UniqueID

Output json Data :

json
{"MESSAGE":"PING OK"}