Skip to content

Overview of OAuth 2.0 within the Upvest Investment API

The Investment API uses opaque access tokens obtained using the OAuth 2.0 Client Credentials flow.

During the onboarding process, each client receives a client ID and a client secret that can be used to request access tokens via our OAuth2 endpoints.

Authentication scopes

The Upvest Investment API supports granular authentication scopes, thus improving security. You can restrict the permissions and data that is requested during authentication by specifying the scopes.

The following table lists available scopes:

ScopePermissions
Users, Account Management, and Taxes
accounts:readRead accounts and accounts groups.
accounts:adminCreate/update/delete accounts and accounts groups.
checks:adminCreate and read user checks.
checks:readRead checks by user or by the check ID.
users:adminCreate/update/delete users and user identifiers.
users:readRead users and user identifiers.
Taxes
taxes:adminModify tax residencies and create/modify tax exemptions.
taxes:readRead tax residencies.
Instruments and Prices
instruments:readRead instruments.
prices:readRead instrument prices including latest price and OHLC prices.
Orders
orders:adminCreate/update/delete orders.
orders:readRead orders.
Investment Solutions
account_liquidations:adminTrigger/read/cancel accounts liquidations.
account_liquidations:readRead accounts liquidations.
portfolios:adminModify portfolios including allocations, configurations, and rebalancing.
portfolios:readRead portfolios.
savings_plan:adminCreate/read savings plans.
savings_plan:readRead savings plans.
Payments
payments:adminPayments and withdrawal operations including direct debits and withdraws.
payments:readPayments and withdrawal read operations.
mandates:adminCreate/update/delete mandates.
mandates:readRead mandates.
reference_accounts:adminCreate/update/delete reference accounts.
reference_accounts:readRead reference accounts.
topups:adminTop-ups operations.
topups:readTop-ups read operations.
credit_fundings:readRead credit fundings details.
Balances
positions:readRead positions and cash balances.
valuations:readRead account valuations.
account_returns:readRead accounts returns.
virtual_cash_balances:adminIncrease and decrease virtual cash balances.
Fees
fees:adminCreate and read fee operations.
fees:readRead fee operations.
Reporting
files:readRead files metadata.
reports:adminCreate reports.
reports:readRead reports.
transactions:readRead cash and securities transactions.
Webhooks
webhooks:adminCreate/update/delete webhooks.
webhooks:readRead webhooks.
Tests
tests:adminTrigger a bank transaction for testing purposes.

Example

Request a users:read access token to read user data but not be able to change user data. Then request a users:admin access token to be able to onboard new users.

More on available permissions see here.

Once the access token is returned, the token can be used in all requests for the specific required scopes using the standard authorization header as shown below:

Example header

Authorization: Bearer <access_token>

The use of client_credentials alone allows us to identify you and authorise your request. However, it does not protect against a man-in-the-middle attack, where the request can be maliciously modified. To mitigate this risk, there is an additional layer of public key infrastructure in the form of HTTP message signatures.