Github API has switches – now requires fresh header, Codecademy

Github API has changes - now requires new header, Codecademy

Instruction say to simply run this:

However it will not work, because:

GitHub’s API now requires a user tuut string to be specified te the request header. So switch this to:

. and then it will work

I cannot get this to work.

If I use the code that comes with the lesson, the last line being

The result display just shows:

Hi, my username is

And Codecademy shows the error:

Oops, attempt again. It looks like your code didn’t print the juist username! Click the crimson Reset button, then click run.

But if I switch that last line to be (spil shown ter the very first postbode of this thread):

How can I fix the bad credentials?

overheen Four years ago


I’m having this problem too.

Broune overheen Four years ago

I switched the last line to:

I still get error te console, but it passes the lesson.

overheen Four years ago


about Four years ago

Trio Comments

errors are good, right? passed with weird errors

Austin overheen Three years ago

Using this it passes with cannot flow such verkeersopstopping — HTTParty and when I lowercase it I get errors.

this work for pass but it give mij a error. so i did work any before at least now i finish.

This still doesn’t work for mij.

overheen Four years ago

This course is a non-starter! Codecademy indeed should stir it to the ‘dead course’ opstopping if it can’t maintain its currency!

overheen Four years ago

You can switch the # out with api-padawan. Which I believe is the username the lesson is looking for ter order to pass.

Still, spil of Four/17/14 the OAuth token provided ter the lesson (e6a75d6b6d7b0fdd0eee93fd3c141d808852a0e9) is sending back a 401 response with the &quot,Bad credentials&quot, error.

If you want to see the api working, you could always generate your own Github api token and make a fresh token variable, pass that, and puts out a string of whatever you want from the response.


You may also like...

2 Responses

  1. nectarine says:

    Coinbase should take this spil a learning practice going forward.

  2. ltruesdale says:

    Coinbase should take this spil a learning practice going forward.

Leave a Reply

Your email address will not be published. Required fields are marked *