Add the current user as a follower of one or more artists or other Spotify users.
Endpoint
PUT https://api.spotify.com/v1/me/following
Request Parameters
Header field | Value |
|---|---|
| Authorization | Required. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the current user. Modifying the list of artists or users the current user follows requires authorization of the user-follow-modify scope. See Using Scopes. |
| Content-Type | Required if IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json |
The Spotify IDs of the artists or users to follow can be passed either as a JSON array in the request body or as a list in the query string.
| Query parameter | Value |
|---|---|
| type | Required. The ID type: either artist or user. |
| ids | Optional. A comma-separated list of the artist or the user Spotify IDs. For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6QA maximum of 50 IDs can be sent in one request. |
| Request body data | Value type | Value |
|---|---|---|
| ids | array of Spotify ID strings | Optional. A JSON array of the artist or user Spotify IDs. For example: {ids:["74ASZWbe4lXaubB36ztrGX",A maximum of 50 IDs can be sent in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored. |
Response Format
On success, the HTTP status code in the response header is 204 No Content and the response body is empty. On error, the header status code is an error code and the response body contains an error object.
Example Request (follow a user)
We want to add the fake user Example User (whose Spotify uri is spotify:user:exampleuser01) to the list of users the current logged in user follows:
curl -X PUT "https://api.spotify.com/v1/me/following?type=user&ids=exampleuser01" -H "Authorization: Bearer {your access token}"
HTTP/1.1 204 No Content
Example Request (follow several artists)
We want to add Bob Dylan (whose Spotify uri is spotify:artist:74ASZWbe4lXaubB36ztrGX) and Tania Bowra (whose Spotify uri is spotify:artist:08td7MxkoHQkXnWAYD8d6Q) to the list of artists the current logged in user follows:
curl -X PUT "https://api.spotify.com/v1/me/following?type=artist&ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q" -H "Authorization: Bearer {your access token}"
HTTP/1.1 204 No Content