Skip to main content
Version: 2.0.0

Token Management

Store newly generated token

When user login into the mobile app, call PUT API /v1/token to store the push token in the IAMS user profile. user_id in the request body is the IAMS user id and device_id is the mobile device id to support multiple devices per user.

Example

Request

PUT /v1/token
curl -L '{{ptmgr_endpoint}}/v1/token' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{access_token}}' \
--data-raw '{
"token": "token-123",
"user_id": "user-123",
"device_id": "device-123",
}'

Response

{
"sent_at": "2024-10-08T06:41:21Z"
}

Refresh existing token

For subsequent login, call the same PUT API /v1/token to refresh the push token in the IAMS user profile.

Expire existing token

PTMGR service will automatically expire the token after certain period of time. Expire time can be configured in the PTMGR configuration.