Branding options
For white label and widget implementations, you can customize the following parameters for your brand:- Main color
- Logo (large)
- Logo (small)
Authentication
The first steps for integrating with Tesouro are to:- Activate your developer account
- Receive your API access key credentials
- Create and authenticate your first JSON Web Token (JWT) to Tesouro.
Access your organization’s API access key credentials
Your organization’s API access key and secret are created by Tesouro and shared with you. To receive access:- Have your designated team lead submit your access request here (external site managed by Tesouro)
- Tesouro will email you an API access key and secret that will require passwordless authentication via email address.
Create and authenticate your JWT
Create a JWT, then add it to the header of your call to query the Tesouro Sandbox environmentAuthentication Request
POST /openid/connect/token
Authentication Request
Example Request
POST https://api.business-banking.app/api/embedded
Example Response
For production, use
https://api.business-banking.app instead of https://api.sandbox.business-banking.app with production credentialsToken Exchange for User Impersonation
For seamless widget and API experiences, Tesouro supports OAuth 2.0 Token Exchange (RFC 8693). This allows your application to impersonate users on the Tesouro platform by exchanging a user JWT for an access token.Token Exchange Request
POST /openid/connect/token
Token Exchange Response
Subject Token Requirements: Your JWT must include both the user’s unique identifier in the
sub claim and the user’s email address in the email claim. The returned access token contains RFC 8693 delegation claims indicating it’s an impersonated token.Security: Users can only be impersonated within their assigned application context. Cross-application impersonation is prevented for security.
Widget Authentication
For embedded widgets, your backend generates a widget token that securely wraps the user’s identity and OAuth credentials using JWE (RFC 7516). This token contains an RFC 8693 token exchange payload that is provided to the widget on the frontend. What You Provide:- Backend code to generate an encrypted JWE widget token
- The token contains user identity (ID and email) and OAuth credentials
- You control token expiration based on your security requirements
Widget Token Generation
Configuration: Tesouro provides
TESOURO_CLIENT_ID, TESOURO_CLIENT_SECRET, and TESOURO_WIDGET_SECRET (exactly 32 bytes) during onboarding.