Skip to content

Verify with curl

Use two requests to confirm that your API Client can obtain an access token and read the device list. You only need curl; no Bruno collection, SDK, or JSON command-line tool is required.

Before You Start

Prepare:

  • clientId
  • clientSecret
  • The device:read permission

Use these commands only for a local verification. Production services must load credentials from protected server-side configuration or secret storage.

1. Create an Access Token

Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET, then run:

bash
curl --request POST 'https://openapi.svnwi.com/wlte/v1/auth/token' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
    "clientId": "YOUR_CLIENT_ID",
    "clientSecret": "YOUR_CLIENT_SECRET"
  }'

A successful response has HTTP status 200, code set to SUCCESS, and an access token at data.accessToken:

json
{
  "code": "SUCCESS",
  "message": "OK",
  "data": {
    "accessToken": "eyJ...",
    "tokenType": "Bearer",
    "expiresIn": 3600,
    "clientId": "cli_xxxxx",
    "scopes": ["device:read"]
  }
}

Copy the value of data.accessToken. See Create Access Token for the complete contract.

2. List Devices

Replace YOUR_ACCESS_TOKEN with the token copied from the first response:

bash
curl --request GET 'https://openapi.svnwi.com/wlte/v1/devices' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Accept: application/json'

The verification succeeds when:

  • The HTTP status is 200
  • The response code is SUCCESS
  • data.devices is an array

An empty data.devices array still confirms that authentication and the endpoint work. It usually means the account or API Client currently has no accessible devices.

Keep Credentials Safe

  • Do not save the token request with real credentials in a repository.
  • Do not run it in a shared terminal session or include it in screenshots.
  • Do not place clientSecret or the access token in browser or mobile code.
  • Use server-side secret storage before moving beyond this one-time check.

See Base URL and Headers for the production security rules.

If Verification Fails

Code or resultWhat to check
AUTH_INVALIDVerify clientId and clientSecret
APP_DISABLEDConfirm the API Client and application are enabled
AUTH_SCOPE_DENIEDAdd the device:read permission and obtain a new token
data.devices is emptyConfirm the account owns devices and the API Client can access them

For other responses, see Common Failures.

Next Steps

Docs buildVersion v1.3.6-20260720-180213-70
Copyright © 2026 WLTE