Request

Code block:

POST https://v2.api.uberflip.com/users/{userId}/avatar
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [Token]" -d "{ \
       \"avatar\": [file data], \
     }" \
-i https://v2.api.uberflip.com/users/{userId}/avatar
import requests
import json

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [Token]',
}

data = '{ "avatar": [file data], }'

response = requests.post('https://v2.api.uberflip.com/users/{userId}/avatar', headers=headers, data=json.dumps(data))
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://v2.api.uberflip.com/streams');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');


$headers = array();
$headers[] = 'Authorization: Bearer [Token]';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
var request = require('request');

var headers = {
    'Authorization': 'Bearer [Token]'
};

var options = {
    url: 'https://v2.api.uberflip.com/streams',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);

Request Parameters

Path Parameters

Description

userId

The unique identifier of the user

Body Parameters

Type

Description

avatar

File

The image file to upload. Max. 200kb