Skip to main content

API Token Endpoints

This document provides detailed information about the API-token management endpoints in the Amove Click API. API tokens are long-lived credentials a user can generate for automated callers.

This API is bound to http://localhost:29123 on a machine running the Amove desktop agent. It is not a hosted service.

Endpoints

  1. Get All API Tokens
  2. Insert API Token
  3. Delete API Token

Get All API Tokens

Returns all API tokens owned by the signed-in user.

  • URL: /apitoken/get_all
  • Method: GET
  • Auth Required: Yes

Query Parameters

ParameterTypeDescription
tokenstringJWT token.

Response

[
{
"id": "00000000-0000-0000-0000-000000000000",
"title": "CI pipeline",
"token": "EXAMPLE_API_TOKEN",
"expirationDate": "2027-01-01T00:00:00Z",
"createDate": "2026-01-01T00:00:00Z"
}
]
FieldTypeDescription
idstring (uuid)Token identifier.
titlestringTitle the caller supplied on creation.
tokenstringThe API token value.
expirationDatestring (date-time)When the token expires.
createDatestring (date-time)When the token was created.

Insert API Token

Creates a new API token for the signed-in user.

  • URL: /apitoken/insert
  • Method: POST
  • Auth Required: Yes

Query Parameters

ParameterTypeDescription
tokenstringJWT token.

Request Body

{
"title": "CI pipeline",
"expirationDate": "2027-01-01T00:00:00Z"
}
FieldTypeDescription
titlestringFriendly title.
expirationDatestring (date-time)Optional expiration date.

Response

Returns the created ApiToken object, including the generated token value.

Delete API Token

Deletes an API token.

  • URL: /apitoken/delete
  • Method: DELETE
  • Auth Required: Yes

Query Parameters

ParameterTypeDescription
idstring (uuid)API token id to delete.
tokenstringJWT token.

Response

200 OK.

Sample Code

Create an API token

Python
import requests

response = requests.post(
"http://localhost:29123/apitoken/insert",
params={"token": "EXAMPLE_TOKEN"},
json={"title": "CI pipeline", "expirationDate": "2027-01-01T00:00:00Z"},
)
print(response.json())
JavaScript
const res = await fetch(
"http://localhost:29123/apitoken/insert?token=EXAMPLE_TOKEN",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: "CI pipeline",
expirationDate: "2027-01-01T00:00:00Z",
}),
}
);
console.log(await res.json());
C#
using System.Net.Http.Json;

using var client = new HttpClient();
HttpResponseMessage res = await client.PostAsJsonAsync(
"http://localhost:29123/apitoken/insert?token=EXAMPLE_TOKEN",
new { title = "CI pipeline", expirationDate = "2027-01-01T00:00:00Z" });
Console.WriteLine(await res.Content.ReadAsStringAsync());

For error handling, see Error Model.