Skip to content
DocumentationAPI Reference

Save Audiobooks for Current User

me().audiobooks().save(AudiobookSaveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/audiobooks

Save one or more audiobooks to the current Spotify user's library.

ParametersExpand Collapse
AudiobookSaveParams params
String ids

A comma-separated list of the Spotify IDs. For example: ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ. Maximum: 50 IDs.

Save Audiobooks for Current User

package dev.cjav.spotted.example;

import dev.cjav.spotted.client.SpottedClient;
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient;
import dev.cjav.spotted.models.me.audiobooks.AudiobookSaveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        SpottedClient client = SpottedOkHttpClient.fromEnv();

        AudiobookSaveParams params = AudiobookSaveParams.builder()
            .ids("18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ,7iHfbu1YPACw6oZPAFJtqe")
            .build();
        client.me().audiobooks().save(params);
    }
}
Returns Examples