Function uber_api::auth

source ·
pub async fn auth(auth_request: AuthRequest) -> Result<AuthResponse, UberError>
Expand description

Retrieve access token for authenticated user

Input Parameters

ParameterDescription
client_idThe Client ID of your application, retrieved from the Direct Dashboard.
client_secretThe Client Secret of your application. This should be treated like your application password.
grant_typeTo 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.
scopeSpecifies the Uber developer endpoints that this token has access to. For Uber Direct, the scope will always be “eats.deliveries”.

Authentication Error Codes

ParameterDescription
invalid_requestRequired parameters were not provided.
invalid_clientThe client ID or secret provided is invalid.
invalid_scopeThe scope provided is invalid
server_errorThe server returned an unknown error.
unauthorizedInvalid OAuth 2.0 credentials provided.