JSON Web Tokens (JWTs)
You can authenticate with Macrometa GDN via JSON web tokens (JWTs). The JWTs in GDN expire after 12 hours unless renewed. So it is best to use API Keys for access by your apps and APIs.
The code sample below shows how you could use a JWT to authenticate with the SDK.
- Javascript
- Python
- REST API
const jsc8 = require("jsc8");
const client = new jsc8({url: "https://play.paas.macrometa.io", token: "xxxxxx", fabricName: '_system'});
from c8 import C8Client
client = C8Client(protocol='https', host='play.paas.macrometa.io', port=443, token=<your tokeb>)
Use our interactive API Reference with code generation in 18 programming languages to Obtain JWT Authentication.