POST /session/login
Initiates a Connectivity Management session and returns a VZ-M2M session token that is required in subsequent API requests.
See also:
Getting Credentials to use the API
End a Connectivity Management Session
A session token will remain valid as long as your application continues to use it, but it will expire after 20 minutes of inactivity. The Best Practice for managing sessions is:
This is more efficient than logging in to get a new token before every API request.
NOTE: The VZ-M2M token is different from the ThingSpace API token that you must use to send API requests. API tokens are valid for one hour, so they have a different expiration schedule than VZ-M2M tokens. See the Getting Credentials page for more information about the two different tokens.
NOTE: The ThingSpace Platform will lock a contact record after 5 consecutive failed log in attempts. You must contact Verizon Support to get the record unlocked.
POST https://thingspace.verizon.com/api/m2m/v1/session/login
None.
None.
The request body must contain the account username and password.
Parameter Name | Data Type | Description |
---|---|---|
username required |
string | The username for authentication. |
password required |
string | The password for authentication. |
curl -X POST https://thingspace.verizon.com/api/m2m/v1/session/login \
-H 'Authorization: Bearer d7bc43e9acc31aba9654fc5cd0d8c520' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"username": "zbeeblebrox",
"password": "IMgr8"
}'
Status 200
Parameter Name | Data Type | Description |
---|---|---|
sessionToken | string | The identifier for the session that was created by the request. Store the sessionToken for use in the header of all other API requests. |
{
"sessionToken": "bcce3ea6-fe4f-4952-bacf-eadd80718e83"
}
Status 400
All error messages are returned in this format:
{
"errorCode": "error code string",
"errorMessage": "error message string"
}
Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.