Documentation (Beta)
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Authentication Token TTL

How to change TTL for authentication token

Step 1. Obtain current settings

Execute GET: /api/customer/{customerId} https://lorawan-ns-na.tektelic.com/swagger-ui.html#/customer-controller/getCustomerByIdUsingGET

Receive Customer Object in response:

{
  "additionalInfo": "string",
  "address": "string",
  "address2": "string",
  "city": "string",
  "country": "string",
  "createdTime": 0,
  "customerSubscriptionId": {
    "entityType": "CUSTOMER_SUBSCRIPTION",
    "id": "string"
  },
  "customerSubscriptionName": "string",
  "customerSubscriptionSince": 0,
  "devicesCount": 0,
  "email": "string",
  "gatewaysCount": 0,
  "id": {
    "entityType": "CUSTOMER",
    "id": "string"
  },
  "name": "string",
  "phone": "string",
  "providerId": {
    "entityType": "PROVIDER",
    "id": "string"
  },
  "state": "string",
  "subCustomersCount": 0,
  "title": "string",
  "zip": "string"
}

Step 2. Apply new TTL settings

  • Modify Customer Object by setting “additionalInfo” parameter with token TTL setting (in seconds): {"accessTokenTtlSeconds": <new TTL seconds>, "refreshTokenTtlSeconds": <new TTL seconds>}

Example:

{
  "additionalInfo": {"accessTokenTtlSeconds": 3600, "refreshTokenTtlSeconds": 3600},
  "address": "string",
  "address2": "string",
  "city": "string",
  "country": "string",
  "createdTime": 0,
  "customerSubscriptionId": {
    "entityType": "CUSTOMER_SUBSCRIPTION",
    "id": "string"
  },
  "customerSubscriptionName": "string",
  "customerSubscriptionSince": 0,
  "devicesCount": 0,
  "email": "string",
  "gatewaysCount": 0,
  "id": {
    "entityType": "CUSTOMER",
    "id": "string"
  },
  "name": "string",
  "phone": "string",
  "providerId": {
    "entityType": "PROVIDER",
    "id": "string"
  },
  "state": "string",
  "subCustomersCount": 0,
  "title": "string",
  "zip": "string"
}
  • Execute POST /api/customer/ with modified Customer Object as body