question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: status code 403

See original GitHub issue

Did youtube update their api?

My code worked yesterday.

The error:

[9020:0217/192331:ERROR:nw_shell.cc(324)] Error: status code 403
    at Request.<anonymous> (app_path\node_modules\ytdl-core\lib\index.js:67:16)
    at Request.emit (events.js:116:17)
    at Request.onResponse (app_path\node_modules\ytdl-core\node_modules\request\request.js:958:10)
    at ClientRequest.g (events.js:202:16)
    at ClientRequest.emit (events.js:116:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:420:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:113:23)
    at Socket.socketOnData (_http_client.js:311:20)
    at Socket.emit (events.js:116:17)
    at readableAddChunk (_stream_readable.js:164:16)
[9020:0217/192331:INFO:CONSOLE(94)] "Uncaught Error: status code 403", source: events.js (94)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:37 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
poidecommented, Jun 19, 2020

Just had this error too, my code worked just fine and then it doesnt, tried to change the api I use to search in yt and still got error 403. So I did what @drepram said, and generated another api key, and now it works again. Thank you @drepram !

0reactions
drepramcommented, Jun 23, 2020

Hi, been 5 years but I had the same error today and I fixed it by generating another API key in Google Developer Console.

The error was:

{ Error: Request failed with status code 403
    at createError (/Users/acp/Works/Megana/ytscrape/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/acp/Works/Megana/ytscrape/node_modules/axios/lib/core/settle.js:18:12)
    at IncomingMessage.handleStreamEnd (/Users/acp/Works/Megana/ytscrape/node_modules/axios/lib/adapters/http.js:202:11)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  config: { a lot of things }
Read more comments on GitHub >

github_iconTop Results From Across the Web

403 Forbidden - HTTP - MDN Web Docs - Mozilla
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.
Read more >
What Is a 403 Forbidden Error (and How Can I Fix It)?
A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server....
Read more >
HTTP Error 403 Forbidden: What It Means and How to Fix It
The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it...If authentication credentials ...
Read more >
HTTP 403 - Wikipedia
HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will not...
Read more >
What Does a 403 Forbidden Error Mean? How Do You Fix It?
The 403 Forbidden error is an HTTP status code that means that access to the page or resource you were trying to reach...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found