0

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?

fallingriptide
  • 314
  • 1
  • 6
  • 12

3 Answers3

0

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

brooksrelyt
  • 3,925
  • 5
  • 31
  • 54
0

I think you need to have the authorization value as Bearer in the headers with your request

0

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).