e82dca4a4b97

latestOpenAPI 3.0.22026-08-101464031.4 MB
Widget Access Token

Generate a widget access token

Generate a widget access token for our Hosted Widget.

post/api/token/

Request body

OR
OR
OR

Example request

{
  "scopes": "read_institutions,write_links,read_consents,write_consents,write_consent_callback,delete_consents",
  "fetch_resources": [
    "ACCOUNTS",
    "TRANSACTIONS",
    "OWNERS",
    "BILLS"
  ],
  "stale_in": "42d",
  "widget": {
    "openfinance_feature": "consent_link_creation",
    "callback_urls": {
      "success": "your_deeplink_here://success",
      "exit": "your_deeplink_here://exit",
      "event": "your_deeplink_here://error"
    },
    "branding": {
      "company_icon": "https://mysite.com/icon.svg",
      "company_logo": "https://mysite.com/logo.svg",
      "company_name": "ACME",
      "company_terms_url": "https://belvo.com/terms-service/",
      "overlay_background_color": "#F0F2F4",
      "social_proof": true
    },
    "theme": [
      {
        "css_key": "--color-primary-base",
        "value": "#907AD6"
      }
    ],
    "consent": {
      "purpose": "Soluções financeiras personalizadas oferecidas por meio de recomendações sob medida, visando melhores ofertas de produtos financeiros e de crédito.",
      "terms_and_conditions_url": "https://www.your_terms_and_conditions.com",
      "permissions": [
        "REGISTER",
        "ACCOUNTS",
        "CREDIT_CARDS",
        "CREDIT_OPERATIONS"
      ],
      "identification_info": [
        {
          "type": "CPF",
          "name": "Ralph Bragg"
        }
      ],
      "default_consent_duration_days": 183
    }
  }
}

Response

Successful operation

accessstring

The access token to be used to authenticate the widget.

refreshstring

The refresh token to be used to authenticate the widget.

Example response

{
  "access": "jwt_test_ey..........",
  "refresh": "jwt_test_ey.........."
}