getting an error code back from sonos auth pages

309 Views Asked by At

when I open a browser window to https://api.sonos.com/login/v3/oauth?client_id=myid&response_type=code&state=mystateinb64&scope=playback-control-all&redirect_uri=my redirect url

i get to the SONOS "starting" screen, then I press "continue" I enter my sonos credentials , click connection then I get to the consent screen showing my APP name, so I click "OK" then I get a http 400 with body {error: "invalid_request"} and my authorization callback is never called

I checked the parameters, esp the client ID in the url , it is correct

any idea why would this be happenning ?

2

There are 2 best solutions below

1
On

Please confirm that the redirect uri you specified when you created your client I’d and secret is exactly the same as the one you pass when you request the auth code and when you request the access token.

0
On

it now worked, I had to delete the sonos credential completely ( not just the key ) and create a new one from scratch. very strange !