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:
clientIdclientSecret- The
device:readpermission
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:
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:
{
"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:
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
codeisSUCCESS data.devicesis 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
clientSecretor 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 result | What to check |
|---|---|
AUTH_INVALID | Verify clientId and clientSecret |
APP_DISABLED | Confirm the API Client and application are enabled |
AUTH_SCOPE_DENIED | Add the device:read permission and obtain a new token |
data.devices is empty | Confirm the account owns devices and the API Client can access them |
For other responses, see Common Failures.
Next Steps
- Run the complete Bruno verification.
- Continue directly to SDK integration.
- Learn how to build a device monitoring dashboard.
