Authorization

Brex
Prerequisites
Before creating a Brex credential, you need to register an OAuth 2.0 application in your Brex account and obtain the Client ID and Client Secret. Brex uses OAuth 2.0 with 3-legged authentication (authorization code flow) to securely authenticate API requests.
To set up OAuth 2.0 authentication for Brex:
-
Create an OAuth Application: Log in to your Brex account and navigate to the Developer Console or API settings section to create a new OAuth application.
-
Obtain Client Credentials: After creating the OAuth application, you will receive a Client ID and Client Secret. These credentials are used to authenticate with the Brex API.
-
Configure Redirect URI: Ensure your OAuth application is configured with the appropriate redirect URI for Nexla's OAuth flow.
-
Select Access Scopes: Determine which access scopes your application needs based on the Brex API endpoints you plan to use. The default scope is
users, but you may need additional scopes depending on your use case.
The OAuth 2.0 authorization URL and token URL are pre-configured by Nexla and do not require manual entry. Nexla automatically handles the OAuth 2.0 authorization code flow, including the authorization redirect, token exchange, and token refresh.
For detailed information about Brex OAuth 2.0 setup, application registration, and available scopes, refer to the Brex API authentication documentation.
Create a Brex Credential
- To create a new Brex credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – Brex

Credential Name & Description
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.
OAuth 2.0 Configuration
-
Enter your Brex OAuth Client ID in the Client ID field. This is the Client ID you obtained from your Brex OAuth application registration. The Client ID is used together with the Client Secret to authenticate and obtain OAuth 2.0 access tokens.
-
Enter your Brex OAuth Client Secret in the Client Secret field. This is the Client Secret you obtained from your Brex OAuth application registration. The Client Secret is used together with the Client ID to securely authenticate and obtain OAuth 2.0 access tokens.
-
Enter the access scope for your Brex application in the Access Scope field. This determines which Brex API resources your application can access. The default value is
usersif not specified. You may need additional scopes depending on the Brex API endpoints you plan to use.The Client ID and Client Secret are used for OAuth 2.0 authorization code flow authentication. The credentials are exchanged for an access token using the Brex token endpoint (
https://accounts-api.brex.com/oauth2/default/v1/token). The access token is then used in theAuthorization: Bearer {token}header for all API requests. Keep your Client Secret secure and do not share it publicly or commit it to version control systems. The OAuth 2.0 authorization URL (https://accounts-api.brex.com/oauth2/default/v1/authorize) and token URL are pre-configured and handled automatically by Nexla. For detailed information about Brex OAuth 2.0 authentication, available scopes, and API access, see the Brex API authentication documentation. -
When you create a Brex credential, Nexla will prompt you to authenticate with your Brex account. Follow the OAuth 2.0 authorization prompts to grant Nexla access to your Brex account resources.
Save the Credential
-
Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.
-
The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.