curl -X GET \
-H "QB-Token: a04ed6adfdb98cde99837088830349f67d012bba" \
-d "field_name=avatar" \
https://api.quickblox.com/data/UserProfileClass/5d863a78a0eb474dae6099c6/file.json
{
"errors": [
"Wrong permission"
]
}
{
"errors": [
"Wrong arguments"
]
}
Custom Objects
Download File
Download the content of file fields.
GET
/
data
/
{class_name}
/
{custom_object_record_id}
/
file.json
curl -X GET \
-H "QB-Token: a04ed6adfdb98cde99837088830349f67d012bba" \
-d "field_name=avatar" \
https://api.quickblox.com/data/UserProfileClass/5d863a78a0eb474dae6099c6/file.json
{
"errors": [
"Wrong permission"
]
}
{
"errors": [
"Wrong arguments"
]
}
Recipes
Download file with API key
Download file with API key
1
1. Use 'Authorization' header to pass API key
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d "field_name=avatar" \
https://api.quickblox.com/data/UserProfileClass/5d863a78a0eb474dae6099c6/file.json
2
2. As a result, the API returns the file content.
HTTP/1.1 200 OK
Content-Type: image/jpeg
<binary file content>
Path Parameters
string
required
Custom object class name.
string
required
ID of the custom object record. Generated automatically by the server after record creation.
Body Parameters
string
required
Custom object record field which contains a file.
Headers
string
required
A user or application session token. See Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
string
default:"ApiKey {your_api_key}"
API key from Dashboard. Expected format:
ApiKey {your_api_key}. Must be used
either QB-Token or Authorization.string
User ID. The user ID of the user on whose behalf the request is being made.
Responses
curl -X GET \
-H "QB-Token: a04ed6adfdb98cde99837088830349f67d012bba" \
-d "field_name=avatar" \
https://api.quickblox.com/data/UserProfileClass/5d863a78a0eb474dae6099c6/file.json
{
"errors": [
"Wrong permission"
]
}
{
"errors": [
"Wrong arguments"
]
}
Was this page helpful?