I recently worked on updating an app I made a couple of years ago, that was using Yelp’s API. I was running into some issues deploying the older version of the app to Heroku, so I decided to update the API it was using to the latest version for Yelp, v3.
As I’m writing this, I found that the Yelp API documentation was a little confusing. The older API required a consumer key, consumer secret, token, and token secret. The Yelp Fusion API only requires an Authorization parameter.
Authentication for the Yelp API is outlined here, although I had to do a bit of fiddling around until I was able to successfully make an API GET request. Here’s what Postman looked like once I was able to make a successful call (click the image to see a larger view):
Something I wasn’t aware of from the APIs I’ve worked with, is that the Headers required a
Content-Type with the value
application/json and an
Authorization with a value that started with the word Bearer, a space, and then the API key I had received from Yelp. So the value looked something like
If you’re curious about how I wrote the code for my application, you can take a look at my github repo for the app, What am I Even Doing?