How to set up HTTP

How to set up HTTP

HTTP support was requested by a user, to be able to connect to their own servers. We thought it was a good idea and implemented an HTTP interface for sending from and to the xBand. 

Sending

  1. In the Xtactor app go to Settings > HTTP.
  2. Enable “Send GET request”.
  3. Enter a URL.

Now, whenever you enter an “H” on the xBand, the app will send an HTTP GET request to your specified URL. Everything after the initial “H” will be sent as a parameter called message. 

Example:  If the URL is: https://xtactor.io/test and you enter 

“H TEST” (H(space)TEST) on the xBand, the app will send a GET request to:
https://xtactor.io/test?message=TEST


If your response contains a JSON body with the key “message” the value will be sent to the wristband as a message.
Example: {“message”:”Hello”}
This response would send the vibration message “Hello” to the xBand.

NOTE: You can add parameters in your URL to for example include an API key for higher security. 
Example: https://xtactor.io/test?key=p63j7ag5r1.

Receiving

  1. In the Xtactor app go to Settings > HTTP.
  2. Enable “Receive GET request”.
  3. (optional) Enter domains and/or IP addresses that are allowed to send messages to your xBand in the field “Permitted domains”. If this field is left blank all domains are allowed.

You can now send a GET request to https://xtactor.io/http?key=<your_key>&message=<your_message>
your_key: Can be found and regenerated in the app. The key is used to find your account and the phone you are logged into. It is your responsibility to secure this key. You can decrease the chance of malicious use by using the “Permitted domains” feature.
your_message: A String that supports space and all Morse characters that you can find in the app in Help > Morse code. The message will be sent as a vibration message to the wristband.

How will you use this feature? Is there another integration you want to support? Tell us in the comments below!


Leave a comment

Please note, comments must be approved before they are published