Good evening everyone. I'm a beginner to API's in general and need some help with Yelp's Fusion API. I think there is some error with my Authorization Variable/Header. I run the request and get a 404 error. Can someone provide some clarity?
You can find more details on Yelp API on this link: https://www.yelp.com/developers/documentation/v3/business_search
import requests
url = 'https://api.yelp.com/v3/businesses/search/';
header = {'Authorization':'Bearer MYLONGTOKENx'}
response = requests.get(url, headers = header)
print(response.status_code)
See the example below, swap the key (xxxxxxxxxxxx) with your api key; I wrote this example for someone before I figure it will help you; in this example we'll make a secure call to Yelp's Business Search API and return back the JSON; parse it and use its values in a simple example; hope it helps!