cURL
curl --request POST \ --url https://api.myidvirtual.com/auth/signin \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>" } '
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "userReturn": { "id": "123e4567-e89b-12d3-a456-426614174000", "email": "[email protected]", "name": "João Silva", "role": "RESALE", "isAppManager": false, "cellphone": "+5511999999999", "credits": 100, "status": true, "createdAt": "2024-01-15T10:30:00.000Z" } }
Autentica usuário com email e senha
curl --location --request POST 'http://localhost:3333/auth/signin' \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "[email protected]", "password": "minhasenha123" }'
{ "username": "[email protected]", "password": "minhasenha123" }
password_passId
{ "username": "[email protected]", "password_passId": "passid_token_here" }
Bearer <token>
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
/auth/me