How to generate $JWT_TOKEN for data query API
See original GitHub issueGood day to all reader,
Thingsboard has prepared the data query API instruction Timeseries data keys API
To get the $JWT_TOKEN is to run the code below:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username":"tenant@thingsboard.org", "password":"tenant"}' 'http://[mylocalhostname]/api/auth/login'
I have tried using the curl.exe software in windows 10 run the code above and the result shown as below:
curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" -d "{"username":"tenant@thingsboard.org", "password":"tenant"}" "https://[mylocalhostname]/api/auth/login" -k {"status":401,"message":"Authentication failed","errorCode":10,"timestamp":1513354947224}
Therefore, I cannot get the correct TOKEN to proceed the query. Do any success cases to generate the TOKEN and the suitable tools to query the data?
Thank you and have a nice day. 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Windows 10 Command line is the problem. Replace ’ with " and put a \ before the double quotes in the JSON object. “{"username":"tenant@thingsboard.org", "password":"tenant"}”
I was running that line in Git Bash on Windows 10. You may try Postman as well