question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replacing "client secret" with "api key"?

See original GitHub issue

Overview

  • Client ID: XPnwvakf-h8eQDoeu2zDHQ
  • Issue type: API Key vs Client Secret?
  • Summary: Which key should we use with Yelp Fusion API?

Description

I’ve misplaced my client secret and tried retrieving it under Manage App. Couldn’t find my client secret but did find my API key which according to Yelp Fusion’s site, is the new standard key that we should be using in lieu of client secret: “Looking for your client secret? The Fusion API now uses API Keys to authenticate requests.”

However, the API key didn’t work with my code - said there was an error with “access token”.

I miraculously was able to retrieve my client secret locally, and noticed that it was different from the API key. My client secret worked to authenticate requests, but my API key did not. If API keys are the new standard, how do we use them for authentication? For future reference, is there a way to retrieve our client secret on Yelp Fusion’s site?

Endpoint

Fusion Search API

Parameters or Sample Request

setting client_secret = API_key

Response

Traceback (most recent call last):
  File "get_reviews.py", line 264, in <module>
    main()
  File "get_reviews.py", line 252, in main
    query_api(term, location, file_name)
  File "get_reviews.py", line 160, in query_api
    bearer_token = obtain_bearer_token(API_HOST, TOKEN_PATH)
  File "get_reviews.py", line 89, in obtain_bearer_token
    bearer_token = response.json()['access_token']
KeyError: 'access_token'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tomelmcommented, Dec 12, 2017

@topspinj yep, they’re deprecated. They’ll still work for a few more months. We’ve updated the docs on the site: https://www.yelp.com/developers/documentation/v3/authentication

We’re working on updating the code samples here too!

0reactions
karishmavanjanicommented, May 16, 2019

Thank you so much for this! I’m new to the whole environment and all help docs on the internet asked me to put in my client_secret.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replace an expiring client secret in a SharePoint Add-in
For expired client secrets, first you must delete all of the expired secrets for a given clientId. You then create a new one...
Read more >
API Keys vs OAuth Tokens vs JSON Web Tokens - Zapier
The ability to change an API key limits the security downsides. ... tokens should not be confused with the Client ID and Client...
Read more >
Creating an API key security definition - IBM
If you require the application developer to supply both client ID and client secret, you must apply two separate API key security definitions....
Read more >
Where can I generate or find my Client ID and Client Secret ...
Click on the Apps menu icon. · Click on API Keys. · Click the + Add New button in the upper right-hand corner...
Read more >
Auth Tokens and How to Change Them - Twilio Support
How do I change my Auth Token? · Access the Account -> API keys and tokens page in Console. · From the top...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found