Skip to main content
Version: 3.5.0

AWT tokens

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 options = {
suri = "<mnemonic or secret seed>"
}
// replace <mnemonic OR secret seed> with process.env.SURI if you have already set the environment variable

avnSdk.awtUtils.generateAwtToken( options, signer )
  • signer: The signer object can be derived by running avnSdk.signer
  • options: The initialisation options for the user.

You can find more AWT token related functions in the AWT section.

information

You can access the library code for this here or with the Github link in the navigation bar at the top.