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 access that is requested during fetching of the authentication token by specifying the scopes.

You can add only scopes which Upvest configured for your client. Upvest provides a complete list of your initially configured scopes when sending your API credentials.

You must ensure that your token has the required scopes for your API requests. You can find the required scopes specified in the security details of the API request in the API reference of our documentation.

Simply press the View security details in the Security section in the specific endpoint.

The Security window appears and shows the required scopes for the endpoint.

Errors - Missing scopes

If you are missing scopes on the client, you will receive an error response with status 401 when creating the token. You must reach out to the Upvest team for further clarification or to update your configuration.

Note

New functionalities and features may require new scopes. Refer to the API reference for details on the required scope for the endpoint.

If you are missing scopes on the token, you'll get an error response with status 403 on the request. To fix this error you must ensure to add the required scopes to the token while fetching it.

List of authentication 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.
Security transfers
security_transfers:adminCreate and read securities transfers.
security_transfers:readRead securities transfers.
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.