Skip to main content
The Cr3dentials SDK automates login flows and extracts data from platforms that require authentication. It works with any platform that needs a username and password, and ships with a Providus Bank strategy that captures transaction data automatically.

Getting your API keys

You need two keys before you start: a Partner API key from Cr3dentials and a Google API key for the Gemini AI features.
1

Get your Partner API key

  1. Sign up or log in to Cr3dentials at app.cr3dentials.xyz.
  2. Go to the Partner API section of the dashboard.
  3. Click “Generate New API Key” or copy your existing key.
  4. Store the key in your .env file.
2

Get your Google API key

  1. Visit aistudio.google.com/app/apikey.
  2. Click “Create API Key”.
  3. Copy the key and add it to your .env file.
3

Set up your environment

.env
Never commit your .env file to Git. API keys and platform credentials are secrets. Add .env to your .gitignore.

Quick start

Install the SDK:
Basic usage, shown here with Providus Bank:

Platform identifiers

Each platform you integrate needs a unique identifier, such as "providus_bank", "your_bank", or "your_platform". Available platform strategies:
  • providus_bank: Providus Bank (Nigeria) with transaction capture
Adding your own platform: You can use the SDK with any platform by:
  1. Choosing a unique platform identifier.
  2. Using that identifier in universalLogin().
  3. The SDK discovers and caches the login flow automatically.

Login and capture data

The SDK logs into a platform and captures relevant data during the login flow.

Providus Bank (transaction data)

Providus Bank captures transaction data automatically during login:

Transaction data structure

Using with other platforms

The same pattern works for any platform:

Verify specific transactions (Providus Bank)

Transaction verification via platformConfig is a Providus Bank-specific feature. Other platforms may have different platformConfig options based on their capabilities.
For Providus Bank, you can verify whether a specific transaction exists during login:

Verification options

All criteria use AND logic, so every field you provide must match.

Manual verification (ZK proof model)

If you do not want the SDK to log in on behalf of users, use the manual verification workflow (similar to zkp2p). In this model:
  • Users log into their bank or platform themselves.
  • The SDK provides a verification session and monitors for proof.
  • No credentials are shared with your application.
  • Users keep full control and privacy.
This approach fits:
  • Privacy-focused applications
  • Compliance requirements where credential sharing is restricted
  • User-controlled verification flows
  • Zero-knowledge proof architectures

Using the API-only client

For manual verification workflows, use Cr3dentialsApiClient instead of the full SDK:
The API-only client is lightweight and does not require browser automation dependencies.
1

Get available verification types

Discover what types of verification are available:
2

Get sources for a verification type

Get the available platforms or sources for a specific verification type:
3

Create a verification session

Create a session where the user will manually verify:
4

Direct the user to the verification URL

Present the verification URL to your user:
5

Poll for verification status

Monitor the verification session for completion:
6

Handle verification results

Once the verification is complete, process the results:

Complete manual verification example

Instead of polling, configure webhooks to receive real-time updates:

Session status reference

Extract custom data

After login, you can perform additional actions and extract custom data from any platform using natural language.

Providus Bank

Using with any platform

The same approach works for any platform. Change the platform identifier and the extraction logic:

Configuration

SDK configuration

apiKey
string
required
Your Partner API key from the Cr3dentials dashboard.
googleApiKey
string
required
Your Google API key. Required for the AI features.
headless
boolean
default:"true"
Hide the browser UI.
verbose
boolean
default:"false"
Enable detailed logging.
sourceName
string
Platform identifier used for flow caching. Match it to the identifier you pass to universalLogin() to enable faster subsequent logins.
timeout
number
API timeout in milliseconds.
retryAttempts
number
Number of retry attempts.
retryDelay
number
Delay between retries in milliseconds.

Environment variables

.env

Error handling

The provided credentials were rejected by the platform. Check the username and password, and confirm the account is not locked or requiring additional verification.
The browser automation could not complete the login or extraction flow. This can happen when the platform UI changed or a step timed out.
The Cr3dentials API returned an error. Read error.statusCode and error.message for details.

Best practices

Always use try/finally

Use environment variables

Development vs production

Monitor live sessions

Reuse the SDK instance

Complete examples

All examples below use Providus Bank as the platform. To use another platform, change the platform identifier and adjust the data extraction logic for that platform’s data structure.

Example 1: Basic login and data capture

Example 2: Transaction verification

Example 3: Custom data extraction