CreateToken() Init; ConstructHeaders; ConstructPayload; JWT := JWT.DefaultSettings; auth := JWT.Encode(JWTPayload,PrivateKey,JWTAlgorithm,JWTHeader,JWTSettings); Init() PMXSetup.GET; JWTPayload := JWTPayload.Dictionary; JWTHeader := JWTHeader.Dictionary; JWTAlgorithm := JWTAlgorithm.RS256; privateKey:= privateKey.X509Certificate2(); JWTSettings := JWTSettings.JwtSettings;