Spotify
Kain edited this page Jul 28, 2021
·
3 revisions
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.
- Visit this page.
- Click "Get Token"
- Click "Request Token"
- Copy token from input box
import { avatar, config } from 'fetch-avatar';
config.set('spotify', 'spotify token here');
avatar.spotify('hpox7s5zt397lu11zh3uk5dbv').then(console.log);
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