Three lines

Uber

Developers

Integration Guide - Authentication

Authentication

To gain access to the Uber Pay API, you need a valid access token from our OAuth service. You can get this token by sending a request to https://auth.uber.com/oauth/v2/token. Keep this access token for any future requests. Additionally, we require you to have access to the payments.deposits scope on your applications page, and have the scope in the oauth request payload set to the same thing. You can see this demonstrated in the example below.

Please do keep in mind that this token is only temporary, and you will need to refresh it once it has expired to make sure it stays active.

For more information regarding authentication through the Uber oauth2 API, read about it in the OAuth API section.

Example request

curl -X POST \
  -F "client_id=RKI7BA3ugxa01Peu-KSL7pEig76iUK6_" \
  -F "client_secret=SECRET_ID" \
  -F "grant_type=client_credentials" \
  -F "scope=payments.deposits" "https://auth.uber.com/oauth/v2/token"

Example response

{
  "access_token": "JA.VUNmGAAAAAAAEgASAAAABwAIAAwAAAAAAAAAEgAAAAAAAAHQAAAAFAAAAAAADgAQAAQAAAAIAAwAAAAOAAAApAAAABwAAAAEAAAAEAAAAA_SbPThodnVCoCSaBrMH8aAAAAAdYwgqOaF5Ub9AyNiWgZLmRvjMuTW--wGos8vj4imGCCo2P2n9FyRG45j1-drRs-jcp4XEkfmNIs1hiT272gpwcikPlutUCyGjFnI_U9dIKa-O1hzZiqe2KUxwAHWnQ2kPJWvHgspAfcT8mKj8A-BE7j0gH3J5cPlQ-i7c74X8p0MAAAAaOTjFRdmMtKeJM7QJAAAAGIwZDg1ODAzLTM4YTAtNDJiMy04MDZlLTdhNGNmOGUxOTZlZQ",
  "token_type": "Bearer",
  "expires_in": 2592000,
  "scope": "payments.deposits"
}

Make API requests

You are now ready to call the Uber Pay API. You have the following options:

  1. Make use of the hosted Postman collection to call the API through the Postman tool or from the command line through Postman generated curl commands. You can then download the code snippet in the language of your choice through the Postman tool.
  2. Create your own client in your programming language.
  3. Make use of our reference app in Node.js. This is particularly useful for you to understand the end-to-end transactional control and data flow.

Postman collections

Use Postman to send requests to the Uber Pay API. To set up Postman:

  1. Download Postman collection
  2. In Postman, select the imported Environment.
  3. Fill in the CURRENT VALUE of variables CLIENT_ID and CLIENT_SECRET with the strings in your Uber Developer account.
  4. Send the request 1. Generate Bearer Token.
  5. Copy the value for access_token from the response into the CURRENT VALUE of variable BEARER_TOKEN in the Environment.
  6. Fill in the CURRENT_VALUE of variables PARTNER_ID and PARTNER_SOURCE_ACCOUNT_ID of the environment, using the IDs provided by Uber.
  7. Update the other variables accordingly: FUNDING_METHOD, CURRENCY, COUNTRY_ISO2, LOCALE.

Now, you can start sending requests. You can find details for each endpoint in the API references.

Uber

Developers
© 2023 Uber Technologies Inc.