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":<text>, /* GUID of the activation code. */
"uid":<long>, /* ID of the unit. */
"tmc":<uint>, /* Creation timestamp. */
"ttl":<uint>, /* Activation code lifetime. */
"tma":<uint>, /* Match timestamp. */
"tme":<uint>, /* Code expiration time. */
"shd":[<long>] /* Array containing IDs of the users the code is shared with. */
},
... /* Other activation codes (if any). */
]
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.
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 6 | Internal server error. |
| 7 | Unauthorized user or access denied. |