#How to configure API keys
Queue Hero relies on four public APIs: Facebook, Yelp, Mapbox, and Twilio. You must register and obtain API keys for each service to run Queue Hero.
###Setting up the Accounts
- Facebook: Once registered, create a new website app. The client ID and Secret can be found at the default dashboard.
- Yelp: Once registered, navigate to "Manage API Keys" to find your API keys.
- Mapbox: Once registered, create a new project under the "Projects" tab which will generate a Map ID which looks like
username.ndi4ksk32
. The default public API token can be located under the "Projects" tab or under "Your Username" -> "Apps". - Twilio: [ INSERT TWILIO ]
###Running Queue Hero on localhost
-
Open
template_api_keys.js
located in./server/config
and input the following information.- Facebook: Client Secret and Client ID
- Yelp: Consumer Key, Consumer Secret, Token ID, and Token Secret
- Twilio: Account SID, Auth Token, and a Sending Phone Number
-
Rename
template_api_keys.js
toapi_keys.js
. Theapi_keys.js
file is in .gitignore to keep it private. -
Go to Facebook developer website and navigate to "Settings" -> "Advanced". Set "Deauthorize Callback Url" at the top of the page to "http://localhost:3000/auth/facebook/callback".
-
On the same page set "Valid OAuth redirect URIs" to also "http://localhost:3000/auth/facebook/callback"
-
Navigate to
./client/src/shared/shared/mapbox/mapbox.js
and locatemapbox.js
. SetL.mapbox.accessToken
to your public access token. SetL.mapbox.map
to include your Map ID. Navigate to./server/requester/requesterCtrl.js
and change the Mapbox public access token on line 8 to your public access token.
Mapbox utilizes public API keys that are sent and visible to all users. The map feature will work without changing any configurations. However, we kindly request you register seperately and use your own API key -
TWILIO INFORMATION
###Running Queue Hero on a Web Server/Heroku
- The API keys must be set as an environment variable. DO NOT remove the
api-keys.js
from .gitignore and deploy, as your API keys will become public. - In heroku, the environment variable can be set via CLI or under the "Settings" tab on Dashboard.
- Please see this documentation at Digital Ocean on setting environment variables on your web server.
- Go to Facebook developer website and navigate to "Settings" -> "Advanced". Set "Deauthorize Callback Url" at the top of the page to be
website-address.com/auth/facebook/callback
. For example in heroku the field should read "yourAppName.herokuapp.com/auth/facebook/callback". - On the same page set "Valid OAuth redirect URIs" to also "website-address.com/auth/facebook/callback"
- Navigate to
./client/src/shared/shared/mapbox/mapbox.js
and locatemapbox.js
. SetL.mapbox.accessToken
to your public access token. SetL.mapbox.map
to include your Map ID. Navigate to./server/requester/requesterCtrl.js
and change the Mapbox public access token on line 8 to your public access token.
Mapbox utilizes public API keys that are sent and visible to all users. The map feature will work without changing any configurations. However, we kindly request you register seperately and use your own API key - TWILIO INFORMATION