Authorization
Requests a valid operation authorization. By default, the authorization is valid for 60 minutes, although with a custom configuration, it can be extended up to 2 hours.
/auth
Endpoint:
POST {url}/api/auth
Headers:
Content-Type: application/json
📥Request body:
Content-Type: application/json
| Campo | Tipo | Descripción | Obligatorio | Ejemplo |
|---|---|---|---|---|
api_key | string | API key for authentication. | ✅ | "abc123xyz" |
profile_uuid | string | UUID of the associated profile. | ✅ | "123e4567-e89b-12d3-a456-426614174000" |
replacements | json | Optional, allows profile settings to be overwritten | ❌ | { "config":{ "sdk":true } } |
metadata | json | Allows metadata to be sent in a callback call | ❌ | { "contractId" : 12132, "callbackToken": "sdgfsa645njfg9834nfgd835TokenPruebas" } |
short_url_pwcs | boolean | Optional. Indicates whether the PWCS URL should be shortened. | ❌ | https://tcl.is/fUBnrLg80Z |
token_duration_minutes | int | Optional. Indicates the duration of the token in minutes | ❌ | 120 |
match_data | json | Optional.Data for validation or cross-checking information | ❌ | {"identifier": "12345678Z"} |
Examples Reques
Basic
{
"api_key": "API_KEY",
"profile_uuid": "UUID",
"short_url_pwcs": true
}Advanced (custom configuration)
{
"api_key": "API_KEY",
"profile_uuid": "UUID",
"short_url_pwcs": true,
"metadata":{
"contractId" : 12132,
"callbackToken": "sdgfsa645njfg9834nfgd835TokenPruebas"
},
"replacements":
{
"email_alert" : "[email protected]",
"redirect" : "http://redirect",
"redirect_ko": "http://redirect_KO",
"callback": "http://callback",
"callback_ko": "http://callback_ko"
},
"match_data":{
"identifier" : "12345678Z",
"iban": "ES1234567890123456789010",
"name": "Juan",
"surname": "Perez Tirado",
"cif": "B1234567C"
}
}📤 Responses
✅ 200 - OK
Description: Login successful.
Example Response:
{
"message": "Login correcto",
"expiredAt": "2026-01-12T12:34:56Z",
"process": "UUID",
"company": "Company Name",
"pwcs_url": "https://short.url/xyz123",
"auth_uuid": "abcdef12-3456-7890-abcd-ef1234567890"
}❌ 401 - Unauthorized
Description: Invalid credentials or unauthorized access.
Example Response:
{
"result": "ko",
"error": {
"error_code": 1001,
"msg": "Unauthorized"
}
}💥 500 - Internal Server Error
Description: Unexpected error during authentication.
Example Response:
{
"message": "Error interno del servidor"
}Updated 16 days ago
