Creates a Key.
URL
https://<FQDN>/v1/clients/<ClientID>/keys
Request Data:
JSON Name | Value | Required | Default | Description | ||
---|---|---|---|---|---|---|
format | String | R | Public Key Response Format, either:
|
Sample request data:
Pack your Request, the following Samples shown here are unpacked only for human readability:
ASN.1
{
"format": "ASN.1"
}
---------------
Raw (Modulus and Public Exponent)
{
"format": "Raw"
}
Response Data:
Status Codes:
JSON Name | Value | Description | Status Code | ||||
---|---|---|---|---|---|---|---|
ASN.1 | Raw | Other | |||||
200 | 200 | ||||||
SC | Integer 3-digit code |
HTTP Status Code | ✔ | ✔ | O | ||
EC | String 1 or 8 characters |
Internal Error Code | ✔ | ✔ | O | ||
EM | String | Error Message | O | ||||
keyID | String 22 characters |
KeyID | ✔ | ✔ | |||
key | String | ASN.1 encoded in Base64 URL-Safe Character Set |
✔ | ||||
keyModulus | String | Modulus encoded in Base64 URL-Safe Character Set |
✔ | ||||
keyExponent | String | Public Exponent encoded in Base64 URL-Safe Character Set |
✔ | ||||
expiration | String | Key Expiration in yyyy-MM-ddTHH:mm:ssZ Format. | ✔ | ✔ | |||
notices | String | Important Notices | O | O | O |
See Status Codes for other possible Status Codes that might be returned.
Sample responses:
Key created returned in ASN.1 format:
{
"SC": 200,
"EC": "0",
"keyID": "TabaPay_KeyID_22-chars",
"key": "Base64_Encoded_Key",
"expiration": "2017-04-03T00:00:00Z"
}
---------------------
Key created returned in Raw format:
{
"SC": 200,
"EC": "0",
"keyID": "TabaPay_KeyID_22-chars",
"keyModulus": "Base64_Encoded_Modulus",
"keyExponent": "Base64_Encoded_Exponent",
"expiration": "2017-04-03T00:00:00Z"
}
Notes:
Keys are valid for 365 days. Key Expiration is now deprecated.
You should only have at most 2 keys active at any one time. If you create more than 2 keys that are currently active (expiration date), you might get a return of SC=429, Too Many Requests
. However, if the system detects that there are more than 2 keys that are currently active (expiration date), the system may automatically delete the older keys until there are at most 2 keys that are currently active.