Yelp authentication setup: Difference between revisions

From CommunityData
m (Added a link to the new Yelp API instructions.)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[File:Yelp Logo.svg|right|300px]]
[[File:Yelp Logo.svg|right|300px]]


'''These instructions are out of date. Use [[Yelp API Key]] instead to get set up for the Yelp session.'''
Web services that offer APIs (such as Yelp) want to know who's using their services; the way they do this is by requiring each developer (that's you!) building an app, or in this case your project, to have a key that your code will use every time it asks Yelp for information.


Things you will need before you start:
[[File:Yelp app details.png|frame|right|400px|Step 2: An example app description and name.]]


* '''A Yelp account.''' The acount ''must'' have a confirmed email address. If you do not have one, this process will fail.
'''1.''' To begin, go to [https://www.yelp.com/developers/documentation/v3 the Yelp developer documentation page] and click on "Create app" on the left. You'll be asked to sign in; if you already have a Yelp account, you can use that; if you want to create a new account or use one of the service integrations, use those. If you sign up with an email, you ''must'' validate the email before you continue.


Follow each of these steps:
'''2.''' After signing in, you'll see a page with fields for a name, description, and such. You'll want to give this a unique name (something like your name, plus "community data science class" might be a good choice). For Industry, select School/Education. If you signed up with an email address, you can use the same email address in the contact address field, and your description can just be a comment about how it's a data science project for a course.


'''1.''' Go to the Yelp development homepage: https://www.yelp.com/fusion
'''3.''' You will want to look through the API terms of use; our specific case is allowed for under the non-commercial data analysis clause. If you're interested in using Yelp's data for commercial purposes, they have a separate license for that! Otherwise, since we won't be displaying results to end users and we'll really only be handling this data as aggregates, we're completely within their terms.


'''2.''' Click on the link that says '''Get Started'''. If you are not logged in, it will prompt you to login.  If you are logged in, it will ask you to provide several pieces of information:
You can choose whether or not you want to receive emails; if you want to use Yelp's developer tools a lot in the future, this may be useful.


:;Your website URL: Enter <tt>http://www.example.com</tt>
'''4.'''After creating your key, you'll want to copy down the Client ID and Key values, and save them somewhere close to your project. But remember to keep these secret! These values are all Yelp knows to relate your work to you.
:;How you will use the API: Practice data analysis using Python
:;Industry: Select "Other" from drop-down; Enter "academic" in the box below.
:;Terms of Use: Read and, if you agree, click on the the checkbox marking that you have read and accept the Yelp API terms of use.


'''3.''' If you are not looking at it already, you can click on the menu item on the left that says '''Manage API access'''. The center of the page should have a heading that says "API v2.0" and it should list three random collections of letters:
* Consumer Key
* Consumer Secret
* Token
* Token Secret
You will need all of these in order to have your Python program work with Yelp.
Copy and paste each of these into a document or text file so that you have them all and know which ones are which. Bring this information to the Saturday session.
Keep this material secret. Your access token and access token secret will allow anybody who has it to post to Yelp as you and to control your account. It is equivalent to your Yelp username and password so please be as careful with it as you would be with your Yelp password!


[[Category:CDSW]]
[[Category:CDSW]]

Latest revision as of 00:22, 10 May 2023

Web services that offer APIs (such as Yelp) want to know who's using their services; the way they do this is by requiring each developer (that's you!) building an app, or in this case your project, to have a key that your code will use every time it asks Yelp for information.

Step 2: An example app description and name.

1. To begin, go to the Yelp developer documentation page and click on "Create app" on the left. You'll be asked to sign in; if you already have a Yelp account, you can use that; if you want to create a new account or use one of the service integrations, use those. If you sign up with an email, you must validate the email before you continue.

2. After signing in, you'll see a page with fields for a name, description, and such. You'll want to give this a unique name (something like your name, plus "community data science class" might be a good choice). For Industry, select School/Education. If you signed up with an email address, you can use the same email address in the contact address field, and your description can just be a comment about how it's a data science project for a course.

3. You will want to look through the API terms of use; our specific case is allowed for under the non-commercial data analysis clause. If you're interested in using Yelp's data for commercial purposes, they have a separate license for that! Otherwise, since we won't be displaying results to end users and we'll really only be handling this data as aggregates, we're completely within their terms.

You can choose whether or not you want to receive emails; if you want to use Yelp's developer tools a lot in the future, this may be useful.

4.After creating your key, you'll want to copy down the Client ID and Key values, and save them somewhere close to your project. But remember to keep these secret! These values are all Yelp knows to relate your work to you.