Skip to content

YouTube Cookies

techy edited this page Apr 8, 2023 · 2 revisions

When setting up Melody, it is advised that you use your own YouTube session cookie to minimise the chance of receiving 429 errors from YouTube. This step is optional, but can help to prevent your IP address from being blocked by YouTube.

IMPORTANT:

Melody NEVER logs your session cookie or passes it to untrusted sources. The only use we have for it is to add it as a cookie to requests sent to YouTube. Never give your session cookie to a tool that you do not trust. If you do not trust Melody, don't give us your session cookie. If you're not using shared hosting such as Heroku, and you have your own dedicated IP address, you most likely don't need to use this guide.

To obtain your YouTube cookie:

  1. Open up a web browser and navigate to YouTube.
  2. Right click on the page, and select 'Inspect'.
  3. Navigate to the 'Network' tab.
  4. Some browsers may now require you to refresh the page. If you don't see anything in this tab refresh now.
  5. Find the item that has 'document' as the initiator, and/or 'html' as the type.
  6. Click on this request, then find the 'Request Headers' section.
  7. Find the entry labelled 'Cookie'.
  8. Copy the entire value of the cookie, then paste it into youtubeCookie in Melody's configuration file.
  9. Set useCustomCookie to be true in Melody's configuration file.
  10. Save your changes and restart the bot.

If you want to stop using a session cookie with Melody or another tool, reset your password. This will make any previous session cookies invalid.

Clone this wiki locally