Autorização no Back Office

Autentique pedidos server-to-server contra a API do Back Office.

Para administradores

The B2COPY API uses bearer-token authorization. Call the sign-in method below to get an access/refresh token pair, then include the access token in the Authorization: Bearer <token> header of every subsequent request.

Prerequisite

To obtain tokens you must already be registered in the Back Office and have credentials to access it.

Endpoint

POST [host]/api/v2/signin

Request body

NameTypeRequiredDescription
emailstringYesThe email address used to access the Back Office.
passwordstringYesThe password used to access the Back Office.
curl --location --request POST 'https://host.name/api/v2/signin' \
--data-raw '{
  "email": "username@example.com",
  "password": "Secret123"
}'

Response

The response returns a pair of access and refresh tokens, each with a token string and createdAt / expiresAt timestamps.

{
  "2faRequired": false,
  "accessToken": {
    "token": "eyJ0eXAiOiJKV1Qi…",
    "createdAt": "2024-01-01T00:00:00+00:00",
    "expiresAt": "2024-01-01T00:00:00+00:00"
  },
  "refreshToken": {
    "token": "eyJ0eXAiOiJKV1Qi…",
    "createdAt": "2024-01-01T00:00:00+00:00",
    "expiresAt": "2024-01-01T00:00:00+00:00"
  }
}
Ainda não é cliente B2COPY?

Leve o B2COPY à sua corretora e cresça no piloto automático

Lance copy trading, PAMM e MAM nos seus servidores existentes e transforme os seus melhores traders num motor de crescimento — com hosting, monitorização e suporte incluídos. Não sabe por onde começar? Fale connosco e nós guiamos.

2–4 semanas

Tempo até ao lançamento

$0

Custo de infraestrutura

40%+

Aumento de volume