I'm attempting to create a url for the Yelp search API endpoint, but can't seem to get the parameters right. I'm pretty new at this, so this is probably a simplistic thing, but I can't find any tutorials on how to create the url.
I've created my API key, but again, the parameters are incorrect.
This is the url I have:
https://api.yelp.com/v3/businesses/search?accessToken=API_KEY&term=food
The JSON output I am recieving is this:
{"error": {"code": "VALIDATION_ERROR", "description": "Authorization is a required parameter.", "field": "Authorization", "instance": null}}
What is the correct url I should be using?
Your link does not include an access token. To authenticate you must get a private API Key that is automatically generated. That is why the error is showing.
There is no connection between the authorization and the API. I would suggest using Postman to query.
You can set up a bearer token using the token given to you by yelp. This way you can use the Postman tool to query.
Docs: https://www.yelp.com/developers/documentation/v3/get_started
I think you need to have the authorization value as Bearer in the headers with your request
I am new to programming but I saw a beautiful error resolution just now and would like to tell you about it.
My error has resolved after I had corrected the spelling of Authorisation as Authorization. (With z in it instead of s).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.