Step 2: UWS Login credentials (VZ-M2M token)
This API requires a special set of credentials that are associated with one or more Verizon business accounts and allow you to manage M2M and IoT devices through an API. These credentials are sometimes called “UWS credentials” or a “UWS account.”
- If you don’t have a Verizon Enterprise account, you can request a trial account when you are ready to test with active devices on the Verizon Wireless network.
- If your company is an existing Verizon Enterprise Customer, you can contact your sales team to request UWS credentials.
Obtaining a VZ-M2M Session Token Programmatically
To send API requests, you must use your UWS credentials to authenticate with the POST https://thingspace.verizon.com/develop/api/m2m/v1/session/login
endpoint at the beginning of each API session. You must put the VZ-M2M session token from the response in the header of all other API requests. To obtain a VZ-M2M session token:
- Follow the instructions above to get a ThingSpace token.
- Send a
POST /api/m2m/v1/session/login
request with the ThingSpace token in the header and your UWS username and password in the body.
Example:
curl --request POST 'https://thingspace.verizon.com/api/m2m/v1/session/login' \
--header ‘Content-Type: application/json’ \
--header ‘Authorization: Bearer <token from step 1’ \
--data-raw ‘{“username”:“username here”, “password”:“credentials”}’
The response will contain a sessionToken, which you can use for the VZ-M2M-Token value in the header of all subsequent requests. The token will remain valid as long as your application continues to use it, but it will expire after 20 minutes of inactivity.
Note: All API calls after the session/login request must have both the ThingSpace token and the sessionToken in the header.