Calico™
v2
  • v2
  • v1
API Reference
getCalico.com
API Reference
getCalico.com
v2
  • v2
  • v1
v2
  • v2
  • v1
  1. Authentication
  • Getting Started
  • Calico Connect
  • Use Cases
  • Pagination
  • Versioning
  • Platform API
    • Try it out
    • Changelog
    • Authentication
      • Authorization Callback
        POST
    • Providers
      • Add providers
      • List connected providers
      • Remove providers
    • Assets
      • User assets
      • Refresh asset list
    • Transactions
      • Transactions
      • Refresh transactions
  • Resources
    • Troubleshooting
    • Response codes
    • FAQs
  • Release Notes
    • Calico Connect 1.5 - March 2026
    • Platform API v2 - March 2026
  • Schemas
    • Schemas
      • CalicoErrorResponse
      • RefreshResponse
    • AddProvidersRequest
    • AddProvidersResponse
    • AddProvidersData
    • ListProvidersResponse
    • ListProvidersData
    • ProviderMetadata
    • DeleteProvidersRequest
    • DeleteProvidersResponse
    • DeleteProvidersData
    • ProviderMetadataV2.1
    • ConnectedProvidersMetadataV2.1
    • GetAssetsResponse
    • GetAssetsData
    • AssetPosition
    • GetTransactionsResponse
    • GetTransactionsData
    • TransactionCategorization
    • TransactionType
    • FeeItem
    • FeeObject
    • CurrencyValue
    • Transactions data
    • Input only transactions
    • Send transaction data
    • Receive transaction data
    • Output only transaction data
    • Transactions with input and output
    • Uncategorized transaction data
    • CryptoSourceCredentialAuthType
    • RefreshResponseData
    • IntegrationResponse
    • IntegrationData
    • AuthMetaData
    • PageData
    • APIConnection
    • WalletConnection
    • OAuth2Connection
    • ErrorItem
    • ProviderId
    • GetConsentURLForThirdPartyResponse
  1. Authentication

Authorization Callback

Platform v2
https://api.getcalico.com
Platform v2
https://api.getcalico.com
POST
/accounts/v2/oauth/callback/{provider_id}
This endpoint is used as the final step of registering an OAuth 2.0 connection.

How it works#

Use this process when an end-user adds a digital asset that requires an OAuth 2.0 login. For instance, if you need to connect an exchange through a login vs an API key.
1.
To add a digital asset with OAuth 2.0, specify the type when initiating the connection with the Add providers endpoint.

Example Add providers body#

{
  provider_id: "exchangeExample",
  connection: { type: "oauth2" }
}
2.
A successful response will include redirect_url, the login URL for exchangeExample. Note that the response will also include "added": false to indicate the process is not complete. Your application should send the user to redirect_url.

Example Add providers response#

{
    "data": {
        "redirect_url": "https://login.exchangeExample.com/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fwidget.getcalico.com%2Foauth-success%2Fcb&client_id=<CLIENT_ID>&scope=wallet%3Aaccounts%3Aread%2Cwallet%3Atransactions%3Aread%2Coffline_access&state=<STATE>",
        "added": false
    },
    "errors": []
}
3.
After the end-user logs in, your app will be given an authorization code. The app should submit that code using the Authorization Callback endpoint.

Example Authorization Callback request#

curl --location --request POST 'https://api.getcalico.com/accounts/v2/oauth/callback/exchangeExample?state=<STATE>&code=<CODE>' \
--header 'Authorization: Bearer <TOKEN>'
4.
A successful response will return a 201.

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Path Params

Query Params

Responses

🟢201Created
application/json
The request was successful and the connection was successfully added.
Body

🟢200OK
🟠400Bad Request
🟠401Unauthorized
🟠404Not Found
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.getcalico.com/accounts/v2/oauth/callback/?state&code' \
--header 'Authorization: Bearer <token>'
Response Response Example
201 - Example 1
{
    "data": {
        "added": true,
        "redirect_url": "string"
    },
    "errors": [
        {
            "provider_id": "string",
            "cause": "bad_request"
        }
    ]
}
Previous
Authentication
Next
Providers