This document provides code to generate a custom avatar profile picture or thumbnail from Roblox using an AJAX POST request. The code specifies camera settings like distance, field of view, and rotation as well as options for an emote, thumbnail type, and handles errors in the response.
This document provides code to generate a custom avatar profile picture or thumbnail from Roblox using an AJAX POST request. The code specifies camera settings like distance, field of view, and rotation as well as options for an emote, thumbnail type, and handles errors in the response.
This document provides code to generate a custom avatar profile picture or thumbnail from Roblox using an AJAX POST request. The code specifies camera settings like distance, field of view, and rotation as well as options for an emote, thumbnail type, and handles errors in the response.
5143056985- black circle cros 12312313- blackweb 2128690040- wide cros 1172208874- teddybear 11810332253- red surrround curs. 11810229301- bacteria cross 11760173469- batman 11759186525- loading curs 11823229964- forcefield curs 11760170230- spider 11723817205- ritual looking curs 11823236632- red skull 170174110- blue spark
Avatar Profile Picture Code:
// doing ajax because easy csrf handling w/their middleware lol
$.ajax({ method: "POST", url: "https://avatar.roblox.com/v1/avatar/thumbnail-customization", contentType: "application/json", data: JSON.stringify({ "camera": { // Ranges are inclusive. "distanceScale": 2, // 0.5 to 4 (Closeup) 1 (FullBody) - Camera distance scale from the avatar "fieldOfViewDeg": 30, // 15 to 45 - Camera Field Of View (FOV) in degrees, slight effect // xRotDeg used to exist here. "yRotDeg": 0 // -60 to 60 - Camera Y rotation in degrees }, "emoteAssetId": 0, /* The assetId of an emote you own. 0 for no emote. * example: 3696763549 in https://www.roblox.com/catalog/3696763549/Heisman-Pose */ // idleAnimationAssetId used to exist here, it has since been removed. "thumbnailType": 1 /* The thumbnailType * 1 = Closeup (headshot) * 2 = FullBody (bodyshot)
Closeup and Fullbody can have separate configurations.
*/ }) }).then(data => console.log(data)).fail(error => alert(error.responseJSON.errors[0].message)); // Logs `{success:true}` if success or website alert if error.