User Profile V2 APIโ
This API returns the same user profile as v1 but in AES-CBC encrypted format for enhanced security.
๐ Decryption Logicโ
Use the function below to decrypt the encrypted fields.
โ ๏ธ Note: You need to obtain the
sKey(secret key) from the support team.
function decryptWithAEScbc(sKey, str) {
const combined = CryptoJS.enc.Base64.parse(str); // Parse Base64 input
const extractedIv = CryptoJS.lib.WordArray.create(combined.words.slice(0, 4));
extractedIv.sigBytes = 16; // Extract IV (first 16 bytes)
const ciphertext = CryptoJS.lib.WordArray.create(combined.words.slice(4));
ciphertext.sigBytes = combined.sigBytes - 16; // Extract ciphertext
const key = CryptoJS.enc.Utf8.parse(sKey); // Convert key to WordArray
const decrypted = CryptoJS.AES.decrypt(
{ ciphertext },
key,
{ iv: extractedIv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }
);
return decrypted.toString(CryptoJS.enc.Utf8); // Return decrypted text
}
๐Header Parametersโ
| Header | Parameter | Type | Description | Example / Enum |
|---|---|---|---|---|
| Content-Type | content-type | string | Format of the request body | application/json |
| Authorization | access_token | string | Token for user authentication | Bearer eyJhbGciOiJIUzI1NiIs... |
| x-api-key | x-api-key | string | API key to authorize the request | 12345-abcde-67890-fghij |
๐ข Response Status Code - 200 Okโ
Content-Type: application/json
| Field | Type | Description | Example / Enum |
|---|---|---|---|
status | string | Status of API call | "success" |
code | string | Response code for the user request | "s-101" |
message | string | Message displayed when the API call is successful | "Success Message" |
data | string | Response data in encrypted format | "ENCRYPTED_STRING" |
Notes โ ๏ธโ
- You must contact the support team to obtain the correct AES key (
sKey). - The encrypted data must be Base64-decoded before performing decryption.
- Use AES-CBC mode with PKCS7 padding for decryption.
- The first 16 bytes of the encoded string represent the Initialization Vector (IV).