Create token for MQTT
The create tokens for MQTT request allows the client application to create tokens for MQTT devices.
You can generate three types of token for MQTT. Following are the auth types:
- U: The auth type is U, when username and password are provided.
For example: If username provided is testP, and secret provided is TESTP, then the auth type will be U.
- S: The auth type is S, when only username is provided, and password is system
generated.
For example: If username provided is US5591USRS91 and secret is not provided, then the auth type will be S.
- SN: The auth type is SN, when username is provided as #SN#, and password may or may not be
provided. If provided, the password will be ignored, and the system generates the username and
password.
For example: If Username provided is #SN#86a39134-e151-4490-aff1-3d7e994151d1, and secret provided/not provided, the auth type will be SN.
Auth type | Username | Password |
---|---|---|
U | Yes | Yes |
S | Yes | No |
SN | #SN# | Yes/No (ignored if provided) |
MQTT-AL tokens are created from http://<impact_url>/m2m/token/mqtt
Create MQTT token for the user describes the API structure for creating MQTT token for the user.
Title | Create MQTT token for the user |
---|---|
URL | http://<impact_url>/m2m/token/mqtt |
Method | PUT |
Content-Type | application/json |
URL Params |
The following are the URL parameters:
|
Data Params |
msg:[string]: Success or failure message tokenResponse:[string]: Specifies the list of tokens created for a group |
Success Code |
Response Code: 202 |
Error Code |
201 : Created 401 : Unauthorized 403 : Forbidden 404 : Not Found |
Sample Call | Curl: Response
Body:
|
Notes |
|