Ajax-loader-large-white
OAuth2
Put the party in third party apps

Aside from not having to handle user passwords, another upside of OAuth for you the application developer is that OAuth calls are easily tracked to your application. If your application becomes popular, the service you're calling might be willing to bump your rate limit, the number of calls you can make in a period of time.

Let's take another look at our API call to create a token and inspect the full response this time.

We're looking for two important headers: x-ratelimit-limit and x-ratelimit-remaining. The first is how many requests your application gets per hour. The second is how many you have left.

Instructions

Change the output to inspect the full response including headers, not just the parsed body.

?
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

Change the last line from puts response.parsed_response to puts response.inspect.

script.rb