Replacing "client secret" with "api key"?
See original GitHub issueOverview
- 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:
- Created 6 years ago
- Comments:5 (2 by maintainers)
@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!
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.