Content - Get Content Download Url

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/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.

POST https://titleId.playfabapi.com/Client/GetContentDownloadUrl

Request Header

Name Required Type Description
X-Authorization True

string

This API requires a client session ticket, available from any Client Login function.

Request Body

Name Required Type Description
Key True

string

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

HttpMethod

string

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

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.

Responses

Name Type Description
200 OK

GetContentDownloadUrlResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-Authorization

This API requires a client session ticket, available from any Client Login function.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

GetContentDownloadUrlRequest
GetContentDownloadUrlResult

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

GetContentDownloadUrlRequest

Name Type Description
HttpMethod

string

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

Key

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.

GetContentDownloadUrlResult

Name Type Description
URL

string

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

Error Codes

Name Code
ContentS3OriginBucketNotConfigured 1299