Get Personal Access Token (PAT)

Prev Next

This tutorial demonstrates how to get Personal Access Token(s) via the RESTful API.

Additional API documentation

To get a list of most of the API requests available, with the 12d Synergy server running, browse http://synergy.myserver.com/api-docs/ui/index.

(Replace synergy.myserver.com with the external server address and update the port numbers if necessary.)

1.1. Get PAT

This request is in the API documentation under Authentication.

Sample Request

curl --location 'http://{your-server-here}/api/v1/auth/getPersonalAccessTokens' \

--header 'Authorization: Bearer <your-token-here>'

Click  in the line below to see the code.

Sample Response

[
    {
        "UserID": {
            "_id": 1,
            "_server_id": 1,
            "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",
            "IDString": "1_1"
        },
        "CreatedOn": "2025-03-14T10:53:38.823+08:00",
        "Expiry": "2025-09-10T10:53:38.67+08:00",
        "Name": "Teams integ",
        "ExpiryReminderState": 0,
        "ID": 1
    },
    {
        "UserID": {
            "_id": 1,
            "_server_id": 1,
            "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",
            "IDString": "1_1"
        },
        "CreatedOn": "2025-04-30T13:21:44.467+08:00",
        "Expiry": "2025-05-02T13:21:44.36+08:00",
        "Name": "asddadas",
        "ExpiryReminderState": 1,
        "ID": 2
    }
]