Get tokens

The get tokens request allows the client application to get the details of tokens generated for a group or for specific token.

This API is applicable for both generic tokens as well as MQTT tokens.

Get token for group describes the API structure for the get tokens event.

Table 1. Get token for group
Title Get token for group
URL http://<impact_url>/m2m/token?groupName=<groupName>
Method GET
Content-Type application/json
URL Params

The following are the URL parameters:

  • groupname:[string]: Specifies the group name for which the tokens must be viewed.

  • token: [string]: Specifies the tokens within a group.

Data Params

The following are the data paremeters:

  • msg:[string]: Specifies the success or failure message.

  • tokenResponse:[string]: Specifies the list of tokens created for a group.

Success Code
Response Code: 202
Error Code
401 : Unauthorized 
403 : Forbidden 
404 : Not Found
Sample Call

Curl:

curl -X GET --header 'Accept: application/json'  --header 'Authorization: Basic amFpX21mb3JtYWRtaW46bWZvcm1RMXcyZSM=' 'http://mfussip02.mformation.com:9090/m2m/token?groupName=DM.MFORM.SURYA'
Response Body:
{
  "msg": "Success",
  "tokenResponses": [
    {
      "token": "1ies73l800aph",
      "secret": "Ihz6SFcsV6rwmwQo3ZRs7Xik4/Y7i+x0sREoE+Qpi+s=",
      "username": "SIP02TEST3"
    },
    {
      "token": "u8diqldsszso",
      "secret": "gNOLHoyUVH5bwYwI2CNK4eBIlCY+kIV5NkkyCJQdpng=",
      "username": "SIP02TEST5"
    },
    {
      "token": "1ien7tn60b1a1",
      "secret": "T2nSUutg+qZozLHOt7ZdAnHyRDoLhc+HHgDtajJfVA8=",
      "username": "SIP02TEST1"
    },
    {
      "token": "s0x9x47e906o",
      "secret": "QFkDR/GSl1yOZqjr9qUuKfZNCfdU34Zt84AhzTzLmzU=",
      "username": "SIP02TEST4"
    },
    {
      "token": "1iuy7tq1wri2c",
      "secret": "RZ5/FWQ132b5tKJ7W6IV8OuziSjdRica83uPYPdljrI=",
      "username": "SIP02TEST10"
    },
    {
      "token": "sl3xycpfc76p",
      "secret": "Dd4X0TyUg/Buw79JwW0ncuAPBm6woOn545EMkAx5a0s=",
      "username": "SIP02TEST2"
    },
    {
      "token": "sl65ujzo09k1",
      "secret": "kvQ8dhN/8aS4/3yzjUPXi8IPK0pAzr/rb1AZ97dFy3Q=",
      "username": "SIP02TEST9"
    }
  ],"code":1000
}
Notes

None