Documentation

GetContentDownloadUrl

This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply.

Request Details

GetContentDownloadUrlRequest
Request Properties
HttpMethod String

HTTP method to fetch item - GET or HEAD. Use HEAD when only fetching metadata. Default is GET.

Key (required) String

Key of the content item to fetch, usually formatted as a path, e.g. images/a.png

ThruCDN Boolean

True to download through CDN. CDN provides higher download bandwidth and lower latency. However, if you want the latest, non-cached version of the content during development, set this to false. Default is true.

POST https://{{TitleID}}.playfabapi.com/Client/GetContentDownloadUrl
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "Key": "images/sword_icon.png"
}
        

Response Details

GetContentDownloadUrlResult
Result Properties
URL String

URL for downloading content via HTTP GET or HEAD method. The URL will expire in approximately one hour.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "URL": "https://..."
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
ContentS3OriginBucketNotConfigured 1299