Using Policies

Once you've generated a policy and its signature, you can use it in multiple ways.

  1. Append the policy and the signature to a Filestack file URL

    https://www.filestackapi.com/api/file/KW9EJhYtS6y48Whm2S6D? signature=4098f262b9dba23e4766ce127353aaf4f37fde0fd726d1 64d944e031fd862c18&policy=eyJoYW5kbGUiOiJLVzlFSmhZdFM 2eTQ4V2htMlM2RCIsImV4cGlyeSI6MTUwODE0MTUwNH0=

  2. In the javascript library:

    You can specify a policy and signature in the options field of any javascript api call. This applies to all functions of the Filestack Javascript Library.

    Example in JSFiddle: http://jsfiddle.net/filepicker/BYF9t/

  3. In the widgets:

    For the HTML widgets, you can specify your policy and signature using data-fp-policy and data-fp-signature.

  4. In the Viewer:

    You can specify your policy and signature using data-fp-policy and data-fp-signature.

  5. In the Transformation Engine:

    You can specify your policy and signature using the security task's policy and signature parameters security=policy:your_base64_encoded_policy and security=signature:your_HMAC-SHA256_hex_encoded_signature.