bidFileContent
Requires permission biddesk:bid:read.
One uploaded bid file's bytes, base64-encoded, for previewing it in the console. Refused with BID_FILE_TOO_LARGE_TO_PREVIEW over 1.4 MB (a larger file opens through bidFileDownloadUrl) and BID_FILE_STORAGE_UNAVAILABLE when storage cannot be reached. Requires Bid Desk and permission to read bids.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query BidFileContent($fileId: ID!) {
bidFileContent(fileId: $fileId) {
base64
contentType
fileId
sizeBytes
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query BidFileContent($fileId: ID!) {\n bidFileContent(fileId: $fileId) {\n base64\n contentType\n fileId\n sizeBytes\n }\n}",
"variables": {
"fileId": "id"
}
}
EOF
Variables:
{
"fileId": "id"
}
Response:
{
"data": {
"bidFileContent": {
"base64": "string",
"contentType": "string",
"fileId": "id",
"sizeBytes": 0
}
}
}
bidFileContent(
fileId: ID!
): BidFileContent!
Arguments
bidFileContent.fileId ● ID! non-null scalar
The file to read.
Type
BidFileContent object
A bid file's bytes, base64-encoded, for previewing it in the console.