get_unit_codes
To fetch the activation codes available to you, use the user/get_unit_codes method.
Endpoint
svc=user/get_unit_codes¶ms={}
Parameters
This method doesn’t require any parameters.
Response
If the request is completed successfully, the response is returned in the following format:
{
"guid": "<string>", // GUID of the activation code.
"uid": "<unit_id>", // ID of the unit.
"tmc": "<created_at>", // Creation timestamp.
"ttl": "<time_to_live>", // Activation code lifetime.
"tma": "<matched_at>", // Match timestamp.
"tme": "<expires_at>", // Code expiration time.
"shd": [] // Array containing IDs of the users the code is shared with.
}
If you are the top user, all activation codes are returned. If you are not the top user, only the codes that have been shared with you are returned.
In case the request fails, the request contains an error code.
Error codes
Error code | Description |
---|---|
6 | Internal server error. |
7 | Unauthorized user or access denied. |