control of a Sonos speaker by a 3rd party application - sonos

I have looked at API provided by Sonos labs. This API is dedicated to music providers.
Is there a public API to control volume of Sonos speakers ?

Yes, the cloud based APIs enable control of both the group and individual players. Check out https://developer.sonos.com/reference/control-api/group-volume/ and https://developer.sonos.com/reference/control-api/playervolume/ .

Related

Is there a way to trigger rateItem API as a Sonos control device?

We currently use the Sonos Control REST API to communicate with the players. We would like to trigger the SMAPI rateItem for the currently playing item (like the Sonos APP does).
Is it possible by using only the Control API?
or is there a chance to get the SMAPI URL of the service by the serviceId used by the Control API, so that we can send the rateItem request directly to that service?
Is there also a JSON REST API available for the SMAPI or is it still only SOAP?
Thanx in advance
No
is the way to go, but you need to have figured out the auth secrets etc in order to get the url of the service, as well as the user credentials.
The devices only do SOAP APIs. JSON APIs are only used for the cloud API (and for the local, private version of that).
I have never taken my SMAPI support as far as the rating stuff. Older versions of my apps did support the Pandora Like button, but that was when Sonos used the old Pandora API, before they switched it over to SMAPI.

Sonos API - Is it possible to play specific song via API

I'm currently integrating the Sonos Control API into our platform.
I successfully integrated "simple" commands related to play/pause, skipToNextTrack, skipToPreviousTrack but is it possible to access associated music provider to the sonos account through the Control API ?
I don't want to integrate a "simple" remote control for Sonos speakers. I would like to use the Spotify, Deezer or whatever associated provider account to search and play a song. Is there a way to do that?
Thanks for any reply :-)
This is not currently a possibility with the Control API. We'll bring your request back to the dev team.

How do I retrieve the catalog of a music service?

I am building an app that integrates nicely with Sonos speakers.
I would like to provide the user the ability to select the container (playlist/stations/...leafs of the tree here) of the music service provider. Say Amazon or Spotify...
I managed to understand the vast majority of the SOAP calls however, I could not figure out how to query the user's selected service (devicelink) and provide the same list that the Sonos controller show.
How do I do that?
thanks!
This is not currently supported by the Sonos APIs and many music services take steps to ensure that only Sonos controllers can browse their catalog.
Sonos decided that access to music services should no longer be allowed by third-party-apps some time ago.
I figured out how it works and made a complete walkthrough here, https://Sonos.svrooij.io/music-services.html
It makes a second connection to the specific music service, just for browsing the catalog.
get some data from the Sonos device
Request an auth code for the service
Let the user login
If the user responded, request an access token and a refresh token.
Save these tokens in your Sonos system (optional)
Use the tokens to talk to the music service
Save and use the new access token if it is expired (optional)
You can also use my sonos-ts library, which has support for music services that require authentication.

How to enable Fitness api in Developer console

I want to develop application for google fit i followed This Link they mentioned to activate google fit API under oath and Api section.
But i cannot see anything related to google fit api in the developer console.
Go to the Google Developer Console and open up your respective project. Under APIs and AUTH -> APIs you should see a list of the available APIs. Enable the fitness API and you should be good.
You can also connect to Terra's API to access Google's API, amongst every other wearable

Basic Google Apis Requirement

Is it necessary to have Google account to use google+ apis like google hangout etc ? Like with Google maps it is not required.
Yes, you do need a Google account to use the Google+ APIs. The reason differs based on the API you're interested in using, though.
REST APIs
You need an API key to use the Google+ REST APIs. You can acquired an API key from the Google API Console. You need a Google account to use the API console. This API key is used for many things including to manage your quota.
Hangouts API
The Hangouts API requires a Google account for two reasons. First, you must use the API console to create your project. Next, you must have a Google account to start a hangout.