

Else, it’s similar to the other requests we already sent. This time it’s a PUT request so the method changed. Now we prepare the request we are going to send. We wrap the whole thing in a JSONObject and the payload is ready. We generate a new JSONArray and add a single entry with our song ID. Then open your adle (Module: app) file and add the dependency on the library:įirst, we prepare the body or here called payload. Unzip the folder and copy the folder into the /app/libs directory in your project’s root directory. If you haven’t yet whitelisted your application, now is the time to do it with “://callback”įirst, we need to add the Spotify Android auth library to our project. Let’s create a basic android project with an empty activity. Great, now that we have done this, we can proceed with our Android project. It’s also possible to do this later after the package name is known, but it has to be done before we first run the application. Be aware that it is not allowed to have underscores in the URI. For example, in my case, this would be “com.spotifyapiexample://callback”. To do that, let’s go to “edit settings” and there under “Redirect URIs” we add the package name to redirect. Now we have to add a redirect URI to our whitelist. Answering if we are developing a commercial integration.Filling out the form, name, description and what we are building (Mobile App).On the right top corner clicking on “create a client ID”.Now we have to execute the following steps:

To do that, we head to and login with our Spotify account. First, we need to create a Spotify API project to allow us to authenticate with it.
