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

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.

Related

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.

Can i create a custom authentication system on top of SkylinkJS

i'm building a website that uses WebRTC to share audio and video. Now i'd like to access WebRTC features on Android devices so i can create an app that can receives audio and video streams from the website.
I've looked for a technology allowing me to do that and I've found SkylinkJS.
It looks great but i'm wondering something. Can i build a custom authentication system on top of SkylinkJS logic. What i mean is that i'd like to make sure the connection to SkylinkJS rooms are initiated by users actually authenticated on my platform.
At the moment, i do that using socket.io but i can do it since i'm using raw WebRTC. How can i do that using SkylinkJS? Using the REST API?
Thanks.
PS: i cannot tag this question with 'skylinkjs' since it's a new tag, but it mights be cool if someone could do it.
Yes you can integrate that with the REST API in this Applications REST API link here - . You can generate your own credentials.
You can generate the connecting credentials from your server and then when the User logs in, generate the credentials for Users to connect to the Room. See more in their support article.
SkylinkJS uses key based authentication mechanism to authenticate against the Temasys signaling servers. This ensures that any application using Skylink can only connect to calls in your application if the app can provide the same secure keys (from your Temasys developer account).
Your best bet in looping in Android would be to use the android counterpart. http://skylink.io/android/

How can Zapier support Dropbox when Dropbox doesn't support Webhooks?

To the best of my knowledge Zapier basically uses Webhooks to link services to eachother. One of the supported services is Dropbox. However Dropbox (still) doesn't support webhooks. (i.e: Dropbox can't signal that a file has, say, updated or changed, to a arbitrary webhook endpoint of choice) .
So how then does Zapier support Dropbox? Does it do longpolling or something?
You'd have to ask them, but I would assume they poll the /delta API.

api created in wso2 appfactory preview api publisher is not working

I created api from WSO2 appfactory preview api publisher. But when I call it from REST client it says the service doesn't exists where in yahoo weather api in the same api store gives OAuth error (which is expected without a token). The backend service runs nicely.
"404Status reportNot FoundThe requested resource (/usdToLkr/0.0.2) is not available."
My API is given here
http://apimanager.appfactorypreview.wso2.com:8280/usdToLkr/0.0.2
What I am doing wrong?
Is it blocked in appfactory preview?
First of all, if you create an API, you have to publish it by publisher.
Then you have to login from WSO2 Appfactory preview and via resources page, you should click on subscribe to API and login to API store via that.
Then you have to first subscribe to the particular API via your created application.
Then the consumer and application keys should be generated manually or automataically once you click on the Renew API keys or API button.
Then if you have provided a working production/sandbox URL during the API creation, it should work.
If you try out with the REST client, you should provide required header values. You get an OAUTH error because you havent provided the token.
A working API invocation sample for App factory preview can be seen from this documentation.
Using REST client to test an API can be seen from this documentation.
Are you looking for an online API management / gateway solution? If so, you should use WSO2 API Cloud instead.
Also, see the tutorials covering the scenarios you mentioned here.