@iamtraction/play-dl
    Preparing search index...

    Function setToken

    • Sets

      i> YouTube :- cookies.

      ii> SoundCloud :- client ID.

      iii> Spotify :- client ID, client secret, refresh token, market.

      iv> Useragents :- array of string.

      locally in memory.

      Example :

      play.setToken({
      youtube : {
      cookie : "Your Cookies"
      }
      }) // YouTube Cookies

      await play.setToken({
      spotify : {
      client_id: 'ID',
      client_secret: 'secret',
      refresh_token: 'token',
      market: 'US'
      }
      }) // Await this only when setting data for spotify

      play.setToken({
      useragent: ['Your User-agent']
      }) // Use this to avoid 429 errors.

      Parameters

      Returns Promise<void>