Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot play any music #528

Closed
Jaymus3 opened this issue Feb 18, 2022 · 5 comments
Closed

Cannot play any music #528

Jaymus3 opened this issue Feb 18, 2022 · 5 comments

Comments

@Jaymus3
Copy link

Jaymus3 commented Feb 18, 2022

Hello! I tried to set up this bot and am having trouble actually getting it to play music. I got it running using the node.js method with a fresh bot account, added the appropriate API keys to a .env file and such, but whenever anyone tries to play a song, we get Request failed with status code 403. Here's the cli output with DEBUG enabled:

  follow-redirects options {
  protocol: 'https:',
  maxRedirects: 21,
  maxBodyLength: 10485760,
  path: '/youtube/v3/videos?expiresIn=3600&id=o_Rpr-uMg14&key=**censored_key**&part=id,+player,+snippet,+contentDetails,+status,+statistics',
  method: 'GET',
  headers: {
    Accept: 'application/json, text/plain, */*',
    'User-Agent': 'axios/0.19.2'
  },
  agent: undefined,
  agents: { http: undefined, https: undefined },
  auth: undefined,
  hostname: 'www.googleapis.com',
  port: null,
  nativeProtocols: {
    'http:': {
      _connectionListener: [Function: connectionListener],
      METHODS: [Array],
      STATUS_CODES: [Object],
      Agent: [Function],
      ClientRequest: [Function: ClientRequest],
      IncomingMessage: [Function: IncomingMessage],
      OutgoingMessage: [Function: OutgoingMessage],
      Server: [Function: Server],
      ServerResponse: [Function: ServerResponse],
      createServer: [Function: createServer],
      validateHeaderName: [Function: __node_internal_],
      validateHeaderValue: [Function: __node_internal_],
      get: [Function: get],
      request: [Function: request],
      maxHeaderSize: [Getter],
      globalAgent: [Getter/Setter]
    },
    'https:': {
      Agent: [Function: Agent],
      globalAgent: [Agent],
      Server: [Function: Server],
      createServer: [Function: createServer],
      get: [Function: get],
      request: [Function: request]
    }
  }
} +0ms
  muse Error: Request failed with status code 403
  muse     at createError (/home/server/muse/node_modules/axios/lib/core/createError.js:16:15)
  muse     at settle (/home/server/muse/node_modules/axios/lib/core/settle.js:17:12)
  muse     at IncomingMessage.handleStreamEnd (/home/server/muse/node_modules/axios/lib/adapters/http.js:236:11)
  muse     at IncomingMessage.emit (node:events:532:35)
  muse     at endReadableNT (node:internal/streams/readable:1346:12)
  muse     at processTicksAndRejections (node:internal/process/task_queues:83:21) +113ms```
@codetheweb
Copy link
Owner

Please double check that the Google API key is correct and that it has access to YouTube APIs (see the README for details).

@Jaymus3
Copy link
Author

Jaymus3 commented Feb 18, 2022

It's a YouTube Data API V3 with no restrictions. I was trying to use an old key when first testing but generated a fresh one and that doesn't work either. When intentionally making my key incorrect, I instead get error 400.

@MRLokop
Copy link

MRLokop commented Feb 18, 2022

i have same issue (using docker container latest tag)

@MRLokop
Copy link

MRLokop commented Feb 18, 2022

ok, I followed the link from the error and got a quota error

@Jaymus3
Copy link
Author

Jaymus3 commented Feb 18, 2022

Got it to work by using a different Google account. Closing this issue.

@Jaymus3 Jaymus3 closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants