Only required if using JSON-RPC
Accessing the gateway API requires an authorisation token to be included in the request header. Aventus Web Token (AWT) is an authorisation token that is included in the header of every request sent to the API gateway.
The API generates this token for you automatically, and includes it in the request header, using the environment variable (SURI) set before using initiating the API. If you haven't set up the token as your environmental variable, you can do so here.
If you want to test the API using a different way (curl or postman...), you can generate this token using the following code:
const awtToken = API.awt.generateAwtToken(<mnemonic OR secret seed>);
// replace <mnemonic OR secret seed> with process.env.SURI if you have already set the environment variable
You can find more AWT token related functions in the AWT section.
You can access the library code for this here or with the Github link in the navigation bar at the top.