Skip to content
DocumentationAPI Reference

Save Audiobooks for Current User

client.Me.Audiobooks.Save(ctx, body) error
PUT/me/audiobooks

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

ParametersExpand Collapse
body MeAudiobookSaveParams
IDs param.Field[string]

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

Save Audiobooks for Current User

package main

import (
  "context"

  "github.com/cjavdev/spotted-go"
  "github.com/cjavdev/spotted-go/option"
)

func main() {
  client := spotted.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  err := client.Me.Audiobooks.Save(context.TODO(), spotted.MeAudiobookSaveParams{
    IDs: "18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ,7iHfbu1YPACw6oZPAFJtqe",
  })
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples