Coder Social home page Coder Social logo

TOKEN_MISSING about yelp-api HOT 8 CLOSED

rahuls2704 avatar rahuls2704 commented on August 16, 2024
TOKEN_MISSING

from yelp-api.

Comments (8)

mittonk avatar mittonk commented on August 16, 2024 7

@rahuls2704 : Great, that's the first step.

Now, for the /v3/business/search request: Do not put your "access_token" in the URL. It needs to go in a Header instead.

  1. If you're using Postman, click the "Headers" tab (https://www.getpostman.com/docs/requests#headers), and add:
Header Name ("Key" in Postman) Header Value ("Value" in Postman)
Authorization Bearer MY_TOKEN
  1. If you're using curl:
curl -H "Authorization: Bearer MY_TOKEN" "https://api.yelp.com/v3/businesses/search?term=delis&latitude=37.786882&longitude=-122.399972"

(You can read more about HTTP headers in https://en.wikipedia.org/wiki/List_of_HTTP_header_fields , but we only need one of them today.)

from yelp-api.

mittonk avatar mittonk commented on August 16, 2024 6

@rahuls2704 : Are you using Postman, curl, or something else to make your request? I can try to use the words your tool uses.

Do you know how to make a POST request? It's not easy to do manually in a web browser, so most people use either Postman or curl. If you're just starting out I'd suggest Postman:

We've set up a list of our URLs in Postman's config format, so you don't have to type them in:

  1. Click "Postman for Chrome."
  2. In the left bar, click "Collections".
  3. Click "POST https://api.yelp.com/oauth2/token"
  4. Click "Body".
  5. On the line "client_id", replace "value" with your "App ID" from https://www.yelp.com/developers/v3/manage_app (22 characters long).
  6. On the line "client_secret", replace "value" with your "App Secret" from https://www.yelp.com/developers/v3/manage_app . (64 characters long, you'll need to click "Show" to see it behind the "*****").
  7. On the line "grant type", leave "client_credentials" as-is.
  8. Click the big blue "Send" button.
  9. In the "Response" field, you should see something like:
{
  "access_token": "MY_TOKEN",
  "token_type": "bearer",
  "expires_in": 15552000
}

The access token will be 128 characters long.

Let me know when you've gotten that far, and we'll do the next step --- but don't reveal your actual access token on the internet!

from yelp-api.

mittonk avatar mittonk commented on August 16, 2024 2

@rahuls2704 : Check out https://www.yelp.com/developers/documentation/v3/get_started .

First, follow "Get an access token" to use POST api.yelp.com/oath2/token with your App ID and App Secret to get an access token.

Next, include that access token in the "Authorization" header:

Header Name ("Key" in Postman) Header Value ("Value" in Postman)
Authorization Bearer MY_TOKEN

How you specify a header depends on what program you're using to make the GET request.
If you're using Postman, use the Headers tab; for curl use -H, etc.

Does that help? If so, we'll put more of this explanation up on the main docs.

(Side note: https://github.com/Yelp/yelp-fusion is the Github repo for the newer Fusion API your'e using; this https://github.com/Yelp/yelp-api/ is for the older V2 API.)

from yelp-api.

rahuls2704 avatar rahuls2704 commented on August 16, 2024 1

Really Great Support from your site. Thanks a lot. You save me lots of time. Thanks a bunch of tone.

from yelp-api.

rahuls2704 avatar rahuls2704 commented on August 16, 2024

Thanks for your response, but not getting any success.

//**********//
Check out https://www.yelp.com/developers/documentation/v3/get_started .

First, follow "Get an access token" to use POST api.yelp.com/oath2/token with your App ID and App Secret to get an access token.
//**********//
I'm not getting the above point. please explained in detail. Thanks in advance.

from yelp-api.

rahuls2704 avatar rahuls2704 commented on August 16, 2024

from yelp-api.

mittonk avatar mittonk commented on August 16, 2024

@rahuls2704 : Wonderful! If you have any more questions, head over to

and good luck!

from yelp-api.

khoick245 avatar khoick245 commented on August 16, 2024

Could you make the Java example for this, sir? I understand the Java v2 sample, but when I try to do with v3, I got stuck at this step {"error": {"description": "An access token must be supplied in order
to use this endpoint.", "code": "TOKEN_MISSING"}}.
I tried to change the key and token from Java v2 file into like this:
screen shot 2017-02-16 at 6 07 06 pm

And change the TwoStepOAuth file into like this:
screen shot 2017-02-16 at 6 09 28 pm

Sorry for the question cuz I'm not good with the documentation

from yelp-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.