Highlighted
Participant
  • 0
  • 1
  • 0
Registered since

Dec 16, 2016

API Code use

Hello ,

I'm start with APi and I need your help guys.
How to use KEY_VALUE ?
Is this right when I use: http://myip:8090/PRESET_1 (return error)

I don't understand how to use it.

Thanks for the help

5 REPLIES 5
Highlighted
Moderator - Retired
  • 0
  • 4188
  • 226
Registered since

May 16, 2016

Re: API Code use

Hi pfj, 

 

I have just sent you a direct message about this. 

 

Thank you 

Highlighted
Participant
  • 0
  • 12
  • 0
Registered since

Dec 31, 2016

Re: API Code use

Hi,

 

Why support through private messages or via API email support? Why not use this forum to share our knowledge. Makes it a lot easier to use and understand. 

 

Regards

Highlighted
Leader
  • 301
  • 316
  • 5
Registered since

Feb 15, 2017

Re: API Code use

What would you like to know? I don't think they are hidding anything, its all out there in their documentation, just in a private conversation they will be able to judge how much the person understands about the protocol.

 

The API works via XML websockets, whilst in most modern browsers you can display the results of the API as they handle the XML response, to send data you need to use a websocket and an XML payload.

 

To set press a Preset button in the API you need to use the function /key, /presets will just return the current set pressets, its all in the documentation to be fair, have you read it?

 

So in short to set the Preset to Preset 1, you would send the following XML payload:

 

Recipient : http://speakerIP:8090/key

Data : <key state ="press" sender="Gabbo">PRESET_1</key>

 

Highlighted
Community Manager - Retired
  • 0
  • 885
  • 26
Registered since

Sep 2, 2014

Re: API Code use

Note:  This message is from Zach Rose, our product manager focused on our public API's and developer relations.

 

Hi all!

 

I wanted to chime in briefly here – We definitely acknowledge that supporting the API via community would be a great thing. In fact, we do have something in the works on this front – as per usual, can’t share details or timelines just yet, but I think you’ll be excited when we can!

 

In the meantime, it’s certainly fine to post here with questions regarding the API, where the broader community can help (Thanks, @mattius!). However, from a practical perspective right now, we’ll be able to respond most quickly if you email questions to SoundTouchAPI@bose.com, which is why we encourage that mechanism for API support at the moment.

 

Finally, I answered a few other API specific questions over on this thread HERE, in case you are interested.

 

Cheers,

Zach

Highlighted
Participant
  • 1
  • 3
  • 0
Registered since

Mar 12, 2017

Re: API Code use

Hi!

 

I made a simple example using PHP and the API, hope it helps you:

 

https://github.com/juanalonso/bosealarmclock