This guide primarily covers content linking for mobile app developers working in the native environment, where it is possible to detect Spotify. If you are linking to Spotify content from the web, refer to the Web Links section below.

Best Experience: Open Spotify content in Spotify

On all major platforms (Android, iOS, MacOS, Windows), the Spotify app registers the spotify: URI scheme for handling deeplinks. These URIs are found in entities returned from the Spotify Web API under the uri field.

  "name": "She's So Unusual",
  "type": "album",
  "uri": "spotify:album:0sNOF9WDwhWunNAHPD3Baj"

When Spotify is installed, navigating directly to content in the Spotify app provides the best user experience, since it brings Spotify to the foreground with the selected content. However, you must first determine whether Spotify is present on the device.

Detecting Spotify

Detecting Spotify from iOS Apps

Your app must declare its intent to detect Spotify. Add spotify under the LSApplicationQueriesSchemes key in your project’s Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Pass a Spotify URI to canOpenURL on the UIApplication class to determine if Spotify is installed:

[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"spotify:"]]

Detecting Spotify from Android Apps

Use getPackageInfo on the PackageManager class to determine if Spotify is installed. The Spotify app for Android uses the package name


PackageManager pm = getPackageManager();
boolean isSpotifyInstalled;
try {
    pm.getPackageInfo("", 0);
    isSpotifyInstalled = true;
} catch (PackageManager.NameNotFoundException e) {
    isSpotifyInstalled = false;

Opening Spotify Content in the Spotify App

Once you’ve determined Spotify is installed, you can navigate directly to Spotify deeplinks.


Pass a Spotify web link to the openURL method of the UIApplication class to open the content in the Spotify app. A web link is preferred over a spotify: deeplink in this scenario because a deeplink will trigger an iOS confirmation prompt before switching to Spotify. Spotify handles the web link through the Universal Links mechanism.


NSURL *url = [NSURL URLWithString:@""];
[[UIApplication sharedApplication] openURL:url];


Start an activity for an ACTION_VIEW Intent, passing your app’s package name in the EXTRA_REFERRER field.


Intent intent = new Intent(Intent.ACTION_VIEW);
                Uri.parse("android-app://" + context.getPackageName()));

Installing Spotify

Follow the steps below if you wish to link users directly to the app store so that they can install Spotify. Spotify partners with Adjust for mobile install attribution.


Trigger the Adjust tracker URL. Pass your application’s bundle ID in the campaign parameter:

NSString *url = @"";
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:uri]];
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];

Open Spotify in the App Store:

NSString *url = @"";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];


Trigger the Adjust tracker URL. Pass your application’s package name in the campaign parameter:

final String url = "";
new Thread(new Runnable() {
   public void run() {
       try (InputStream in = new URL(url).openStream()) {
       } catch (IOException e) {
           Log.w(LOG_TAG, "Couldn't open tracking url", e);

Open Spotify in the Google Play Store:

final String appPackageName = "";
try {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException ignored) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("" + appPackageName)));

If the user doesn’t have Spotify installed or you’re otherwise unable to detect Spotify, you should open Spotify web links ( in the system browser or a webview.

Web links are provided in Web API entities under the external_urls.spotify field.

  "name": "She's So Unusual",
  "type": "album",
  "external_urls" : {
    "spotify" : ""


In order for Spotify to attribute traffic to your app, pass your application’s Android package name or iOS bundle ID in the utm_source query string parameter. For example:

Note: Web links from the Web API may contain other query string parameters. Make sure your implementation preserves existing parameters.

Allow Deeplinking from Webviews

Content at links directly into Spotify or the app store. By default, both Android and iOS restrict webviews and prevent deeplinking into apps.

Support deeplinks by ensuring the webview handles the following schemes:

  • spotify:
  • market: (Android)
  • itms: (iOS)
  • itms-apps: (iOS)

Read more: Android: iOS: