I tried to play around with this code in order to make it work even I generated my own github api key but still got this message
"Oops, try again. It looks like your code didn't print the correct username! Click the red Reset button, then click run."
this is my code

require 'httparty'

token = "1c4b40471046fdb5d0ff81570c7564fe244940c2"
token2 = "86dd4e7d571dcc7ee557ba8b412a3cb91facaa2f"

user = HTTParty.get "https://api.github.com/user",
:headers => {
"Authorization" => "token #{token2}",
"User-Agent" => "codecademy"

puts "Hi, my username is #{user["login"]}"


I came across the same problem. Is the token expired?


As you get farther, you run into more problems. Looks like this lesson needs to be updated.


I got the same error.


You see, github no longer uses OAuth2. Github uses OAuth3 as that is the latest version.