Learn how to set up a social connection with Spotify in your Clerk application.
Clerk does not currently support preconfigured shared OAuth credentials for Spotify on development instances. You will have to provide custom credentials for both development and production instances, which includes generating your own Client ID and Client Secret using your Spotify Developer account. Don't worry, this guide will walk you through that process in just a few simple steps.
Before you start
- You need to create a Clerk Application in your Clerk Dashboard. For more information, check out our Set up your application guide.
- You need to have a Spotify developer account. To create one, click here.
Create a Spotify application
Once redirected to the application creation form, you need to set an App name, App description, and Redirect URI. Website is optional.
Spotify + your Clerk app
You can retrieve the Redirect URI from the Clerk Dashboard. But first, you need to enable Spotify as a social connection for your Clerk application.
Navigate to the Social Connections page in your Clerk Dashboard. Toggle on the Spotify option.
In the modal that opened, copy Authorized redirect URI. Keep this modal and page open.
Configure Spotify application
Navigate back to your Spotify app and paste the Authorized redirect URI you copied from the Clerk Dashboard into the Redirect URIs input.
Agree to Spotify's terms and conditions and click Save.
Once your Spotify app is created, you'll be redirected to the app dashboard. From there, navigate to Settings.
Copy the Client ID and Client Secret. Go back to the Clerk Dashboard, where the modal should still be open, and paste these values into the respective fields.
If the modal or page is not still open, navigate to the Social Connections page in the Clerk Dashboard and click on the settings cog icon next to the Spotify option. You can now paste the Client ID and Client Secret into their respective fields.
Congratulations! Social connection with Spotify is now configured for your Clerk application.