Skip to main content
POST
/
v2
/
FileGet
Get a user file
curl --request POST \
  --url http://localhost:3000/v2/FileGet \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "identity": "<string>",
  "fileuuid": "<string>",
  "filename": "<string>",
  "raw": true,
  "request_metadata": {}
}
'
{
  "status": "ok",
  "token": "<string>",
  "fileuuid": "<string>",
  "filename": "<string>",
  "mimetype": "<string>",
  "size": 123,
  "filedata": "aSDinaTvuI8gbWludGxpZnk="
}

Authorizations

X-Bunker-Token
string
header
required

API token for authentication

Body

application/json
mode
enum<string>
required

Mode of user identification

Available options:
login,
token,
email,
phone,
custom
identity
string
required

User identifier corresponding to the mode

fileuuid
string

Unique identifier of the file to retrieve (preferred)

filename
string

Name of the file to retrieve (resolves to the most recent file with this name)

raw
boolean

If true, return the raw decrypted bytes instead of a base64 JSON response

request_metadata
object

Additional metadata for the request

Response

File retrieved successfully

status
string
Example:

"ok"

token
string

User's unique token

fileuuid
string

Unique identifier of the file

filename
string

Name of the file

mimetype
string

MIME type of the file

size
integer

Size of the file in bytes

filedata
string<byte>

Base64-encoded file content