UBER Api : How to know if the user is a rider or driver? - uber-api

We are creating an application for Uber Driver and we found that we can authenticate the driver using Drivers Api, but we found that Riders and Drivers use the same api endpoint.
So how to know if the user is an Uber Driver or Rider? and how to know if the driver is verified driver and all his documents are approved or not?
Thanks in advance.

When you authenticate your user - you have following endpoint available to get driver info: "GET /v1/partners/me".
The Profile endpoint returns the profile of the authenticated driver. A profile includes information such as name, email, rating, and activation status.
Similar endpoint to get rider info is: "GET /v1.2/me". The Rider User Profile endpoint returns information about the Uber user that has authorized with the application.

Related

Could Huawei AppGallery Connect API be used with specific project?

A connect API client is created using AGC Console Connect API option. When creating the client, a project is selected as well to limit the scope of access. Credentials are created without problem.
Obtained access token by using POST to this AGC URL, then passed the token to publishing API, Connect API server returned 403 error code when using GET method to query the API. Checking the document, there is mention of setting the project to N/A to avoid the error.
My question is why the project could not be set here?
Connect API is team-level access. It is valid for all projects under the account ID which created the connect API client. To use connect API, a project should always be set to N/A.
The project would be specified when server SDK is used in a project.
The value of project must be set to N/A because the Connect API requires some account-level permissions. If an application is restricted, the permissions cannot be obtained. Therefore, you cannot set a specific application.

I needed to access HUAWEI AppGallery Connect API and create a product through the PMS API (server API). But 403 client token authorization fail

Recently,I needed to access HUAWEI AppGallery Connect API
and create a product through the PMS API (server API). However, when Postman
was used for basic service interconnection tests,
the error message "403 client token authorization fail" was displayed.
how can i fix it?
Based on the error code included in your screen captures, the error was caused by an authentication failure.
To solve the problem, you first need to confirm that the client ID used for applying for the token has sufficient permission.
HMS official document suggested that the project associated with the API client be selected as N/A. You need to create an API client and associate it with a project. E.g. An app ID in the project was 100xxx591. However, the app ID in the Postman service request was 101xxx531, which would cause the authentication failure.
Also, to fix the above, you need to create an API client and selected N/A (indicating that all projects are supported), and use the client to request a token. The process should work well after this.
In general, if Huawei's 403 authentication failure occurs, you can verify the permission first, and then check the associated projects.
For more details about the PMS API, please refer to this link.

Error Implementing Acumatica REST API

I am currently trying to implement the use of the Acumatica REST APIs in a project I am working on. I am able to successfully log in to the application.
The issue is when I try to access additional data, customers for example, I receive the following message: {"message": "You have been logged out because your account has been disabled. Please contact your system administrator."} in the form of a 403 error.
I checked my account permissions and I do have the System Admin Role on the account I am using to log in to Acumatica. Below is a screen shot of my postman.
You probably have the admin user disabled.
Some function of Acumatica impersonate the admin user in order to complete their task. Some of these functionalities include the web services, the scheduler and the integration services.
Enabling the admin user should fix the issue you are facing.

Getting 401 unauthorized error when trying to get Uber diver profile information

I have tried to get uber driver profile information using the following URL,
GET: https://api.uber.com/v1/partners/me
As a first step I have set scopes as follows in the authorization step and get the access token,
https://login.uber.com/oauth/v2/authorize?client_id={cliend_id}&response_type=code&response_type=code&scope=profile%20history%20request%20places
All working fine but when I try to get profile information, I got this error:
{
"message": "This endpoint requires at least one of the following scopes: partner.accounts, partner.admin_accounts",
"code":"unauthorized"
}
Driver API is with limited access. In order to access Driver API endpoints, you will need to apply for scope whitelisting - in your case it is partner.accounts. You can apply for access to Driver API here: https://developer.uber.com/products/drivers but just as a heads up access granting is currently very limited.
So after we review your access request - and you get access to the scope - please select it on your application dashboard - and when you authenticate your users - you will authenticate your users with this scope - and be able to access "GET /v1/partners/me" endpoint.

GSuite : Client is unauthorized to retrieve access tokens using this method

Hi I'm trying to develop an for GSuite admin which enables to migrate their google drive data to another cloud service. But in the process of authentication i'm getting the below error.
{
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method."
}
Below are the api's that are enabled in developer console.
1. Admin SDK
2. Contacts API
3. G Mail API
4. Calendar API
5. Drive API
Please guide me if done anything wrong in creating an app.
The main thing what i missed here is Authorizing my service account client ID with the GSUITE admin.
And I have been trying to generate access_token for the expired domain of mine.
After clearing all these i have to success in generating and getting user data.
This solution worked for me. I hope it works for you tooo....
Thank you community.