NWMS API Authentication

  • 家
  • NWMS API Authentication
API 30.08.2025

NWMS API authentication

Protected endpoints accept a Bearer token. Create a named key in NWMS or obtain a token through POST /api/login.

Create a key in your profile

  1. Sign in to your NWMS installation and open My account (Мой аккаунт) → API keys (API-ключи).
  2. Give the key a name such as “Inventory sync”. Choose no expiration or set an expiration date and time in the displayed time zone.
  3. Select Create API key. Copy the full value and store it in the integration's secret store. NWMS shows it only once.

API v1 and v2 accept profile keys directly. Keys use the owner's current permissions, and all keys share the user's rate limits. Managing another user's keys requires the role permission and access to manage that account.

Send a test request

GET /api/v2/me
Accept: application/json
Authorization: Bearer YOUR_TOKEN

Send the request to your own NWMS installation. A 200 response confirms access. The key list shows the date and time the API last accepted each key. If you receive 401, check the installation address, key and expiry. A 403 response calls for checking the owner's permissions.

Rotate or revoke a key

Create a replacement, update your integration and verify a request. Then delete the old key by name and ID. If a key is exposed, delete it immediately.

Obtain a token with your login and password

POST /api/login
Content-Type: application/json
Accept: application/json

{
  "email": "user@example.com",
  "password": "YOUR_PASSWORD"
}

Read access_token from the response and send it in the same Authorization: Bearer YOUR_TOKEN header. POST /api/logout revokes the token sent with that request.

API v2 authentication and user operations