Skip to content

Instantly share code, notes, and snippets.

@rychoo2
rychoo2 / viewer_signing.py
Created October 21, 2025 06:46
Draftable Compare API - Signing viewer URLs walkthrough
import json
import hashlib
import hmac
from collections import OrderedDict
def get_viewer_url_signature(account_id, auth_token, identifier, valid_until_timestamp):
# type: (str, str, str, int) -> str
# First, we generate our policy, which is an object giving the account_id and