Docs home

Invalidate API Key

Logs out the API key you send: the key stops working at once. Use it when an integration is done with a key, or to end a user's session.

POST/user/logout
Invalidate API Key
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/user/logout' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --data 'apikey=<api-secret>'
{
  "code": 200,
  "message": "logout.success"
}

Access: Any logged-in user, for their own key.

Request body: Optional. form-data with one field, JSONString, containing this JSON:

BodyJSONString
fcm_idstring
Push notification token of the device to stop sending notifications to.
Response200application/json
codeinteger
Example: 200
messagestring
"logout.success"
Example: logout.success

Notes: Get a new key by logging in again. The browser session cookie, if any, is cleared too. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI