Search code examples
sonos

Sonos API Redirect URI


I have a question about the Sonos API authentication redirect URI. In previous projects I have used a redirect URI that my native application can intercept. Such as myApp://auth-code. That does not appear to be possible with the Sonos API as it expects the redirect URI to be publicly routable and HTTPS. Must I have my own server that sits between my native client and the Sonos API? I have a feeling I may be missing something simple here. Thanks for your time.


Solution

  • Just have a dummy endpoint e.g. firebase cloud function that does a redirect to your own custom scheme, e.g., location.href="myapp-scheme://..."

    make sure to append the query parameters.

    you can also avoid opening an external browser by embedding a safari webview.