Skip to content

Queue - KYC Validation

URLs

MethodURLActionDescription
POST/api/v1/integration/queueRegisterCreates an object in the processing queue for KYC validation
GET/api/v1/integration/queue/{id}ViewChecks the processing status of an object in the queue

Production:

{connect-producao}/api/v1/integration/queue

Staging:

{connect-homologacao}/api/v1/integration/queue

1 - Get Token (client_credentials)

auth_url: https://security.fanbase.com.br
grant_type: client_credentials

Request

http
POST https://security.fanbase.com.br/api/token?grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}

Response (example)

json
{
  "access_token": "your_access_token",
  "token_type": "Bearer",
  "expires_in": 3600
}

QueueApiKey authentication (alternative)

Since the queue flow is based on an interface (ifcode), authentication can also be done without AccessToken, using QueueApiKey:

A) Access Token

http
AccessToken: {access_token}

B) API Key Header

http
X-Api-Key: {QueueApiKey}

C) Basic Auth

http
Authorization: Basic base64({ifcode}:{QueueApiKey})

D) HMAC - SHA256

http
X-Webhook-Id: {ifcode}
X-Webhook-Signature: sha256={signature_hex}

Formula:

text
HMAC-SHA256(secret, request_body) -> hex string -> prefix "sha256="

2 - Create processing queue object

api_url: https://connect.fanbase.com.br

Body (ExemploQueueNewC / kyc-validation)

json
{
  "action": "kyc-validation",
  "data": {
    "firstName": "Joao",
    "lastName": "Exemplo",
    "birthday": "1980-08-05",
    "UserId": 1329964,
    "SSOId": 123456789,
    "Identifier": "joao@exemplo.com",
    "verified": true
  }
}

2.1 - Example using AccessToken

http
POST https://connect.fanbase.com.br/api/v1/integration/queue
AccessToken: {access_token}
Content-Type: application/json

2.2 - Example using X-Api-Key

http
POST https://connect.fanbase.com.br/api/v1/integration/queue
X-Api-Key: {QueueApiKey}
Content-Type: application/json

2.3 - Example using Basic Auth

http
POST https://connect.fanbase.com.br/api/v1/integration/queue
Authorization: Basic base64({ifcode}:{QueueApiKey})
Content-Type: application/json

2.4 - Example using HMAC-SHA256

http
POST https://connect.fanbase.com.br/api/v1/integration/queue
X-Webhook-Id: {ifcode}
X-Webhook-Signature: sha256={signature_hex}
Content-Type: application/json

Success response (create)

Status: 201 Created

json
{
  "id": "uuid-of-object",
  "created": "2025-01-01T00:00:00Z",
  "iCode": 0,
  "iMsg": "Object created successfully",
  "processDate": null,
  "processStatus": "pending",
  "processMsg": null
}

3 - Check object processing

Use the id returned on create:

http
GET https://connect.fanbase.com.br/api/v1/integration/queue/{id}
AccessToken: {access_token}

You can also query using QueueApiKey authentication alternatives from the previous section.

Success response

Status: 200 OK

json
{
  "id": "uuid-of-object",
  "created": "2025-01-01T00:00:00Z",
  "iCode": 0,
  "iMsg": "Processed successfully",
  "processDate": "2025-01-01T00:05:00Z",
  "processStatus": "completed",
  "processMsg": "KYC validation completed",
  "msg": {
    "action": "kyc-validation",
    "data": {
      "firstName": "Joao",
      "lastName": "Exemplo",
      "birthday": "1980-08-05",
      "UserId": 1329964,
      "SSOId": 123456789,
      "Identifier": "joao@exemplo.com",
      "verified": true
    }
  }
}

Fanbase API Documentation