Skip to main content

Encrypt Plaintext Script and Return Download URI

  • Description

    POST /encript HTTP/1.1
    args: {"no_strip":true|false, "info":{}, "entitlements":{}, "xuic":true|false, "filename":"UTF8-URIEncoded filename"}

    [script content]
  • Parameters

    • no_strip: boolean
      When true, keep debug info so stack traces retain line numbers. Default false
    • info: table
      Metadata bundled with the script, such as Name, Version, Description, etc.
    • entitlements: table
      Script permission configuration
      • allow-external-require
        If missing or false, only scripts encrypted with the same author certificate may require this script; if a list, allow scripts signed by the listed authors; if true, allow any script to require
    • xuic: boolean
      When true, encrypt an XUI file into XUIC format and ignore other parameters. Default false
    • filename: string
      Filename to use when downloading via the returned URI; must be UTF-8 URI encoded in advance
    • script content: string
      The plaintext script body to encrypt, sent as the request payload
  • Possible Responses

    • Success: status code 200 with body
      {
      "code":0,
      "message":"Success",
      "download_uri":"/download_encript" // download encrypted file via this URI
      }
    • Failure: status code 400 with body
      {"code":2,"message":"Operation failed"}
      {"code":2,"message":"Syntax error in script","detail":"specific error details"}
      {"code":13,"message":"Another encryption is in progress..."}