Skip to content

Spotify

Kain edited this page Jul 28, 2021 · 3 revisions

OAuth Token

Easiest way to get a Spotify token is through the developer console.
Note: This token will expire after 1 hour. Visit this page for information on refreshing the token.

  1. Visit this page.
  2. Click "Get Token"
  3. Click "Request Token"
  4. Copy token from input box

Example

import { avatar, config } from 'fetch-avatar';

config.set('spotify', 'spotify token here');
avatar.spotify('hpox7s5zt397lu11zh3uk5dbv').then(console.log);

User ID

Your User ID can be found when you open your Spotify profile, the URL will be something like:

https://open.spotify.com/user/hpox7s5zt397lu11zh3uk5dbv

The last part hpox7s5zt397lu11zh3uk5dbv is the User ID. Not all IDs are as ugly as mine, older accounts or special users have IDs that are words or numbers.
EG: wizzy and 124859559

Clone this wiki locally