{"id":13799870,"url":"https://github.com/objectiveSee/Uber-Alexa-Skill","last_synced_at":"2025-05-13T08:32:12.726Z","repository":{"id":146699231,"uuid":"43623897","full_name":"objectiveSee/Uber-Alexa-Skill","owner":"objectiveSee","description":"An Alexa skill for calling an Uber ride.","archived":false,"fork":false,"pushed_at":"2015-10-15T15:50:55.000Z","size":258,"stargazers_count":14,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T15:00:05.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/objectiveSee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-04T03:36:57.000Z","updated_at":"2024-01-12T18:25:45.000Z","dependencies_parsed_at":"2023-04-03T21:01:52.514Z","dependency_job_id":null,"html_url":"https://github.com/objectiveSee/Uber-Alexa-Skill","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectiveSee%2FUber-Alexa-Skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectiveSee%2FUber-Alexa-Skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectiveSee%2FUber-Alexa-Skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectiveSee%2FUber-Alexa-Skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectiveSee","download_url":"https://codeload.github.com/objectiveSee/Uber-Alexa-Skill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253903887,"owners_count":21981766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:06.806Z","updated_at":"2025-05-13T08:32:12.454Z","avatar_url":"https://github.com/objectiveSee.png","language":"JavaScript","readme":"# Sample Phrases\n\n```\nAlexa, tell Uber to pick me up.\n\nAlexa, ask Uber how far away the nearest car is.\n\nAlexa, ask Uber where my car is.\n\nAlexa, ask Uber if it is using sandbox. (Debugging Info)\n```\n\n\n# Setup\n\n1. All configuraton and user-specific variables are handled inside of `config/default.json`. Copy `config/sample.json` to `config/default.json` and fill out the appropriate fields. You will need to provide all of your API keys. For Uber, you will need a valid token from oAuth2.0 which is currently up to you (see below in the README for how to do this). Optionally add a Forecast.io weather API key (`Weather.api-key`).\n\n```js\n{\n  \t\"Uber\": {\n\t\t\"client_id\": \"required\",\n\t\t\"client_secret\": \"required\",\n\t\t\"server_token\": \"required\",\n\t\t\"redirect_uri\": \"optional\",\n\t\t\"access_token\":\"required\",\n\t\t\"sandbox\" : true\n\t},\n    \"Alexa\": {\n\t\t\"location\": { \"latitude\": required, \"longitude\": required },\n\t\t\"lambda-arn\" : \"required\"\n    },\n    \"Weather\" : {\n    \t\"api-key\" : \"optional\"\n    }\n}\n```\n\n2. Create a new Alexa skill and use the provided info in `interaction-model.txt` for your Intent Schema and Sample Utterences, as well as Custom Slot Types.\n\n3. Upload code to your lambda function. `gruntFile.js` has been configured to upload to you Lambda function. You can deploy to Lambda using `grunt deploy`. See https://github.com/Tim-B/grunt-aws-lambda for more info\n\n4. Configure lambda function. Make sure you set the handler to `skill.handler` and add an `Alexa Skills Kit` event source.\n\n# Uber Authentication\n\nUber requires authentication using OAuth2 **which is a pain to deal with**.  I was able to get my auth credentials using [a blog post](http://uberhackathon.devpost.com/updates/3114-helpful-hints-for-hacking) from a Hackathon of theirs. They link to [sample code on GitHub](https://github.com/uber/Python-Sample-Application) for a Python OAuth library, but there is a bug in their code where they do not ask for the `request` permission which is needed to call an Uber. Until [my pull request](https://github.com/uber/Python-Sample-Application/pull/28) is accepted, you might want to run [my fork](https://github.com/objectiveSee/Python-Sample-Application/) of the library. \n\n## Getting your Uber auth token\n\n1. Follow steps in their tutorial to get the Python app running. Note that on step 2 of their instructions, we want the `request` permission in addition to the `history` and `profile`.\n2. Visit `http://localhost:7000` in your web browser, which will re-direct you to the Uber auth page and then re-direct you back to the localhost server. \n3. Once authenticated with Uber, you will see an auth token in the browser. **This is what you need** to use in the Alexa skill in order for Alexa to speak with the Uber API.\n\n## Making this easier\n\nThis server could be shared with everyone wishing to use this skill. Perhaps someone can set it up on Heroku.\n\n# Notes\n\n- The main entry point for the code is `skill.js` which uses boilerplate Skill code from Amazon. This is where most of the Alexa and speech code lives.\n- `uber-skill-handler.js` contains most of the code dealing with the Uber API.\n- Provides a `sandbox` flag in config for testing.\n","funding_links":[],"categories":["Skills"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FobjectiveSee%2FUber-Alexa-Skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FobjectiveSee%2FUber-Alexa-Skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FobjectiveSee%2FUber-Alexa-Skill/lists"}