getToken()
getToken() API checks if a token exists for a plaintext value. If the token exists, it is returned, else the API returns the null value. This method is also supported in the batch mode.
Request URL
Url: http://localhost:8080/tmrest/SafeNetTokenManager/getToken
Url for Batch: http://localhost:8080/tmrest/SafeNetTokenManager/batch/getToken
Method
POST
Request Parameters
Parameters | Descriptions |
---|---|
naeUser | A Key Manager user with access to the AES and HMAC keys. |
naePassword | The Key Manager user’s password. |
dbUser (optional) | A database user with access to the token table. |
dbPassword (optional) | The database user’s password. |
value(s) | data which needed to be checked for token existence. |
tableName | This is the Token Vault name and it must be in CAPITAL LETTERS. |
customData (optional) | The customer-specific data associated with each plaintext value. |
Note
For MySQL, if the customData parameter is null or empty, then getToken() API returns results for all customData values, in token vault.
Returned Values
String or string array of token(s).
Example
{
"naeUser":"jit",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"values":["23333333333333","2222222222222","4444444444444"],
"tableName":"test"
}
Result
{
tokens: [3]
0:"25863143853333"
1:"4302578582222"
2:"6627979014444"
}