getToken()
getToken() checks if a token exists for a plaintext value. If the token exists, it is returned. Otherwise the method returns null.
Note
This method is overloaded to handle value and customData arrays.
!yaml
public string getToken (string value, string customData, string table) public string[] getToken (string[] values, string[] customData, string table)
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
value | string or string[] | A plaintext value, or an array of values. |
customData | string or string[] | Customer-specific data or an array of customer-specific data. Note: For My SQL, if the customData parameter is null or empty, then the getToken() API returns results for all customData values in token vault. |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. |
Returned Values
An array of the token(s).
Exception
Passes an exception if:
A table is missing, input value is null, the values and customData arrays are not the same size.
There is a problem accessing the keys on the Key Manager.
A customData element is too long.
Example
getToken(values, null, "CREDIT_CARD_NUMBERS");