Skip to content

Generate File Token

Generate a file token. POST only.

Request:

  • requestType is generateFileToken
  • secretPhrase is the passphrase of the account generating the token
  • file is the path to the file to be signed

Response:

  • token (S) is a 160 character string representing the 100-byte token which consists of a 32-byte public key, a 4-byte timestamp, and a 64-byte digital signature
  • account (S) is the account number corresponding to secretPhrase
  • accountRS (S) is the Reed-Solomon address of the account
  • timestamp (N) is the time (in seconds since the genesis block) that the token was generated
  • valid (B) is true if token is valid, false otherwise
  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: Since token contains the token generator’s public key and digital signature, the file can be validated as digitally signed by the owner of the public key using Decode File Token.