# Create temporal access

Create a new temporal access for a device. To be able to do this properly you will need at least 1 key values: until_time which you want the temporal access to end.

POST api/v1/devices/{anydeskid}/temporal

# Parameters

Parameter Type Status Default Description
from_time Integer optional Current time UTC epoch timestamp from which the link is valid
until_time Integer required UTC epoch timestamp until link is valid

# Note

  • from_time parameter must be lower than until_time parameter. If from_time is not provided, the validity of the link will start at the time of creation.

Example request:

curl -X POST https://app.anyclassroom.com/api/v1/devices/123456789/temporal \
   -H 'X-Token-AC: {token}' \
   -H 'Accept: application/json' \
   -H 'Content-Type: application/json' \
       --data '{
           "from_time": "1633707089",
           "until_time": "1633710689"

Example response:

Content-Type: application/json

    "data": {
        "token": "88f34d5a-a0aa-4c59-828e-67dbb6099203",
        "from_time": 1633707060,
        "until_time": 1633710660,
        "url": "https://app.anyclassroom.com/temporal-access/88f34d5.......",
        "created_at": "2021-08-08T16:08:35.000000Z",
        "updated_at": "2021-08-08T16:08:35.000000Z"