pub async fn auth(auth_request: AuthRequest) -> Result<AuthResponse, UberError>
Expand description
Retrieve access token for authenticated user
| Parameter | Description |
| client_id | The Client ID of your application, retrieved from the Direct Dashboard. |
| client_secret | The Client Secret of your application. This should be treated like your application password. |
| grant_type | To access the Uber Direct API, authenticate your application by setting this to the client_credentials grant type. This will create an OAuth 2.0 access token with the specified scope. |
| scope | Specifies the Uber developer endpoints that this token has access to. For Uber Direct, the scope will always be “eats.deliveries”. |
| Parameter | Description |
| invalid_request | Required parameters were not provided. |
| invalid_client | The client ID or secret provided is invalid. |
| invalid_scope | The scope provided is invalid |
| server_error | The server returned an unknown error. |
| unauthorized | Invalid OAuth 2.0 credentials provided. |