From c13623c3f779458e9a20881f81748712764d67c6 Mon Sep 17 00:00:00 2001
From: Fabio Manganiello Confirm your credentials in order to generate a new API token.
+ API tokens are randomly generated tokens that are stored
+ encrypted on the server, and can be used to authenticate with the
+ Platypush API.
+
+ When compared to the
+ JWT tokens, API tokens
+ have the following advantages:
+
+
+ You can use your token to authenticate calls to the
+
+
+ /execute
endpoint or the Websocket routes.
+
+ You can include the token in your requests in any of the following ways:
+
+
+
+ Authorization: Bearer <token>
+ header (replace <token>
with your token).
+ X-Token <token>
header (replace
+ <token>
with your token).
+ http://site:8008/execute?token=...
.
+ {"type":"request", "action", "...", "token":"..."}
.
+
Confirm your credentials in order to generate a new JWT token.
+ + ++ JWT tokens are bearer-only, and they contain encrypted + authentication information. +
+ ++ They can be used as permanent or time-based tokens to authenticate + with the Platypush API. +
+ ++ When compared to the standard + API tokens, JWT tokens + have the following pros: + +