Publisher API¶
- GET /me¶
Retrieve information about the authenticated user’s pool
- Query Parameters:
key (string) – The API key of the pool. If not provided, the public API key is used.
Example request:
GET /me HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Success
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
403 Forbidden – Invalid API key
- GET /link¶
Generate a circumvention link for a specific resource
- Query Parameters:
url (string) – The URL for which a circumvention link needs to be generated. (Required)
type (string) – The type of link to generate. Valid values are “live”, “short”, or “snapshot”. If not provided, “direct” is used.
key (string) – The API key of the pool. If not provided, the public API key is used.
expiry (string) – The duration that a snapshot will remain published for. Valid values are “long” and “short”. If not provided, “short” is used.
footer_text (string) – Defines the footer text to be used when publishing a snapshot.
footer_link (string) – Defines the footer link to be used when publishing a snapshot.
Example request:
GET /link?url=string HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Success
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
403 Forbidden – Resource not on a supported domain
404 Not Found – No live mirror exists for the resource
500 Internal Server Error – Could not generate a snapshot for the resource
- GET /{hash}¶
Redirect to the live mirror associated with the given hash
- Parameters:
hash (string) – The hash associated with the short link
- Query Parameters:
force (boolean) – Always redirect to a mirror and ignore GeoIP information.
force_ip (string) – Override the client IP address and base the GeoIP lookup on this IP address instead.
Example request:
GET /{hash} HTTP/1.1 Host: example.com
- Status Codes:
302 Found – Redirects the client to the original URL
404 Not Found – The hash is invalid or not found
- Response Headers:
Location – The URL of the live mirror