Gravv docs
Docs Agent Sign in Get API keys

Get a card PIN

Returns the card PIN, encrypted to your RSA public key in the same way as the sensitive details. The decrypted text is {"pin": "4821"}. Only the first 6 characters of a PIN are returned.

GEThttps://api.gravv.xyz/v1/cards/{card_id}/pin

Headers

Your RSA public key in PEM form (PUBLIC KEY or RSA PUBLIC KEY), then base64-encoded with the standard alphabet. Use a key of 2048 bits or more.

Path Parameters

ID of the card

Responses

Status Description
200 The encrypted PIN
400 The request failed. Every card error is a 400, including not-found. Read error.

200 response

Decrypt encrypted_key with your RSA private key (RSA-OAEP, SHA-256) to get an AES-256 key. Then decrypt ciphertext with AES-256-GCM using nonce (12 bytes); the last 16 bytes of ciphertext are the tag. All three values are standard base64.

400 response

What went wrong

{
"data": null,
"error": "card does not exist"
}

Authorization

  • ApiKeyAuth
Was this page helpful?
ESC