media

Migrate Media URL

Changed on

Converts a legacy storage.googleapis.com attachment URL to the new Periskope media URL format. Also accepts an existing Periskope media URL to refresh its access token (e.g. after the link has expired).

The media object must belong to the organization of the API key used.

post/media/migrate-url

Request

  • Base URL
    https://api.periskope.app/v1
  • URL
    https://api.periskope.app/v1/media/migrate-url
  • Auth
    HTTP bearer

Request body

urlstring required

The media URL to migrate. Either a legacy storage.googleapis.com attachment URL or an existing Periskope media URL.

access'private' | 'public'

Access mode for the returned URL. private returns a tokenized link that expires; public returns a bare link. If omitted, follows your organization's Media Privacy setting.

expires_in_secondsnumber

Validity of the returned link in seconds. Only valid for private links. Clamped between 60 seconds and 7 days. Defaults to your organization's configured link expiry.

Example request

{
  "url": "https://storage.googleapis.com/periskope-attachments/2997dd64-89bf-48d3-9a22-b314fca017e5/919876543210/msg_ABCDEF123/file.jpg",
  "expires_in_seconds": 86400
}

Response

200 OK

urlstring

The migrated Periskope media URL. Includes an access token when access is private.

access'private' | 'public'

The access mode applied to the returned URL.

expires_in_secondsnumber

Validity of the returned link in seconds. Only present for private links.

Changes