I am trying to follow the basic tutorial provided by Spotify here, but I am getting the following error when I try to authenticate:
2014-12-20 15:32:18.526 SpotifyTest[18319:53463120] *** Auth error: Error Domain=com.spotify.auth
Code=400 "Invalid client" UserInfo=0x7fcbb84c1e40 {NSLocalizedDescription=Invalid client}
What I have done:
- My token exchange service is deployed to Heroku. I used this app. I have confirmed that the service is running.
- I have triple checked that my Client Id, Client Secret, and callback URI are the same everywhere.(i.e. Spotify Developer Interface, Token Exchange Service, AppDelegate).
- Linker Flags = "-all_load -ObjC" (I added the all_load flag to fix this problem)
- URL Types = my callback URI excluding "://callback"
Log from my Token Exchange Service:
2014-12-20T21:32:18.347945+00:00 heroku[router]: at=info method=POST path="/swap" host=hidden-brushlands-8320.herokuapp.com request_id=903792bf-561d-4635-be85-5b1f27676afa fwd="<ipAddress>" dyno=web.1 connect=1ms service=407ms status=400 bytes=349
2014-12-20T21:32:18.347480+00:00 app[web.1]: <ipAddress> - - [20/Dec/2014 21:32:18] "POST /swap HTTP/1.1" 400 63 0.4018
2014-12-20T21:32:18.347821+00:00 app[web.1]: ip-10-87-143-248.ec2.internal - - [20/Dec/2014:21:32:17 UTC] "POST /swap HTTP/1.1" 400 63
2014-12-20T21:32:18.347865+00:00 app[web.1]: - -> /swap
I've never really done iOS development before, I just was interested in playing around with the Spotify sdk so let me know if there is any other relevant information I can provide.