uber-api

Invalid OAuth2 Credentials in Uber SDK for android

可紊 提交于 2019-12-25 09:28:09
问题 Below is my code to retrieve user profile. My login is successful , but when I try to fetch email address, I get the above error: private void initializeUber(){ if(!UberSdk.isInitialized()) { SessionConfiguration config = new SessionConfiguration.Builder() // mandatory .setClientId(AppConstants.UBER_CLIENT_ID) // required for enhanced button features .setServerToken(AppConstants.UBER_SERVER_TOKEN) // required scope for Ride Request Widget features .setScopes(Arrays.asList(Scope.PROFILE)) //

Uber SDK in android

点点圈 提交于 2019-12-25 07:15:30
问题 I am trying to add an Uber 'request a ride' button in my android application. In my gradle build file I have added the following line: compile 'com.uber.sdk:rides-android:0.5.0' Automatically Android studio asks to sync the gradle files as they have changed. After this I get 500+ errors with my project but when I remove the dependency it all goes back to normal. Could anyone please help me solve this issue? The module gradle script: apply plugin: 'com.android.application' android {

Calling Uber API from Rails: {“error”: “invalid_client”}

亡梦爱人 提交于 2019-12-24 17:03:04
问题 Been at this for a day. Using Rails to call the Uber API and failing to get an access token. Grabbing the authorization code works, but exchanging for an access token does not. I've tried with and without the OAuth 2.0 gem and made sure all my keys were accurate. Tried on two separate Uber accounts, too. All combinations give the same error: {"error": "invalid_client"} . I'll post the non-OAuth code below. params[:code] is the auth code returned from Uber. uri = URI.parse('https://login.uber

Getting a “No 'Access-Control-Allow-Origin' header is present on the requested resource.” Error

十年热恋 提交于 2019-12-24 04:37:28
问题 Further to the previous question - Uber API - HTTPS needed for Price Estimates? - I have set up https on our site. My App on Uber Developer is set up with the redirect URL & Origin URL being the https domain. Following the code on this page - https://developer.uber.com/v1/api-reference/#request-response - I've tried testing the code given here:- var xhr = new XMLHttpRequest(); xhr.setRequestHeader("Authorization", "Token YOUR_SERVER_TOKEN"); xhr.open('GET', 'https://api.uber.com/v1/products

Get Users end point location using Uber API

我怕爱的太早我们不能终老 提交于 2019-12-24 02:12:28
问题 I've been looking at the UBER API and i was wondering if there was a way to have a service running in my Android / iOS app, where my app could get the users drop-off location. The way i'm thinking about it now is the following scenario: - The user is in a UBER car going to destination - My app gets notified of the drop off location(lat,long) location - My app suggests things that they can do around their drop off location, via a notification. Is such a use case possible ? I am interested in

Uber API doesn't allow request from localhost

久未见 提交于 2019-12-23 23:03:54
问题 When I use the Uber API, with localhost I receive the following error: ... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. So maybe I made an error. To test, I tried the url in Postman, but everything works as expected; I receive the expected JSON data. I also tried with curl. It works as expected. I am sending my server token and I've adjusted my headers. No luck. Previous SO answers hinted at this

Display ETA and estimated money option for my “Ride there with Uber” button

谁都会走 提交于 2019-12-23 18:41:51
问题 I have integrated a "Ride there with Uber" button to my app. I feel, it would be more convenient for the users, if i displayed the ETA and estimated pricing for the destination. How may I achieve this? I am following this guide as of now : https://github.com/uber/rides-ios-sdk It seems like I need, some kind of product ID to be able to achieve this. But how do i get it? Made some progress, I got my self the product id, but it still doesn't work. Here is my current code: 回答1: Button will

Cannot Get Token from Uber API with Valid Access Key

主宰稳场 提交于 2019-12-20 02:52:09
问题 I've been trying for the past few days to integrate my app with uber, but for some reason during the oauth2 authentication I can't get uber to give me a valid token. I can get an access code but when using curl, I can't seem to get an access token, no matter how I arrange my script. Here's what I have: <?php echo $_GET['code']."<br>"; $token = curl_init(); $param = array( 'client_secret' => 'MY_SECRET', 'client_id' => 'MY_ID', 'grant_type' => 'authorization_code', 'code' => "{$_GET['code']}"

This endpoint requires at least one of the following scopes: all_trips_lite, request, all_trips

孤街浪徒 提交于 2019-12-18 09:37:48
问题 I am doing authentication from Uber SDK https://sandbox-api.uber.com/v1.2/requests/current but when I add "Authorization" , "Accept-Language" , "Content-Type" it returns this message { "message": "This endpoint requires at least one of the following scopes: all_trips_lite, request, all_trips", "code": "unauthorized" } any one can help me to get out from this problem 回答1: Related to your integration you will need the user to grant access to your application through the OAuth 2.0 Authorization

uber requestRide() method Response Error 401: Unauthorized

ぐ巨炮叔叔 提交于 2019-12-13 03:18:33
问题 I am getting Error when I try to call requestRide() method on Uber api. The response body is null and the response message is "Unauthorized" with error code 401; whereas the onResponse() callback method is executing but onFailure() callback method is not executing. Here is my code for calling requestRide() and implementing the callback interface... private void requestForNewRide(RidesService service, int position){ RideRequestParameters rideRequestParameters = new RideRequestParameters