Basic Auth

How Basic Auth Works

  1. Combine credentials: Join your username and password with a colon: username:password
  2. Base64 encode: Convert the combined string to Base64
  3. Add to header: Include the encoded string in the Authorization header with the Basic prefix
❗️

Since the credentials are send in clear text (base64 is not an encryption), it must be used only on HTTPS connection (we provide this security on all our servers).

Authentication Examples

Using curl with credentials

# Direct credential usage (curl handles the encoding)
curl --request POST \
     --url https://app.digiteal.eu/api/v1/ibanAccountHolderVerification \
     --user 'your-username:your-password' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
       "iban": "BE03130000000184",
       "name": "Digiteal SA"
     }'

Using pre-encoded Authorization header

# Manual header construction
# Example: username="testuser", password="testpass123"
# Base64("testuser:testpass123") = "dGVzdHVzZXI6dGVzdHBhc3MxMjM="

curl --request POST \
     --url https://app.digiteal.eu/api/v1/ibanAccountHolderVerification \
     --header 'Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3MxMjM=' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
       "iban": "BE03130000000184",
       "name": "Digiteal SA"
     }'

Programming language examples

Python

import requests
import base64

username = "your-username"
password = "your-password"

# Option 1: Let requests handle it
response = requests.post(
    "https://app.digiteal.eu/api/v1/ibanAccountHolderVerification",
    auth=(username, password),
    json={
        "iban": "BE03130000000184",
        "name": "Digiteal SA"
    }
)

# Option 2: Manual header construction
credentials = f"{username}:{password}"
encoded_credentials = base64.b64encode(credentials.encode()).decode()
headers = {
    "Authorization": f"Basic {encoded_credentials}",
    "Content-Type": "application/json"
}

JavaScript (Node.js)

// Option 1: Using axios with auth parameter
const axios = require('axios');

const response = await axios.post(
  'https://app.digiteal.eu/api/v1/ibanAccountHolderVerification',
  {
    iban: 'BE03130000000184',
    name: 'Digiteal SA'
  },
  {
    auth: {
      username: 'your-username',
      password: 'your-password'
    }
  }
);

// Option 2: Manual header construction
const credentials = Buffer.from('your-username:your-password').toString('base64');
const headers = {
  'Authorization': `Basic ${credentials}`,
  'Content-Type': 'application/json'
};