TTWrite API Documentation: avatar_cover Endpoint

This document provides detailed instructions for using the avatar_cover endpoint in the TTWrite API. This endpoint allows users to manage their avatars, profile covers, and cover repositioning. Each section describes the functionality, required parameters, and expected responses.


Navigation Overview

The avatar_cover endpoint uses a tab-based structure for its functionalities:

  1. Upload Avatar
    • Tab ID: nav-1
    • Includes: avatar.phtml
  2. Upload Cover
    • Tab ID: nav-2
    • Includes: cover.phtml
  3. Move Cover
    • Tab ID: nav-3
    • Includes: move.phtml

Functionalities of the avatar_cover Endpoint

1. Change User Avatar

API Endpoint

  • URL: avatar_cover/mobile_api/avatar

Parameters

FieldValueRemarks
session_idAccess token IDExample: de25cc16eb00960f076...
avatarImage file (jpg, png, jpeg, gif)Example: image.jpeg

Description

This API function allows users to upload or update their avatars. Only supported image formats are accepted.


2. Change User Profile Cover

API Endpoint

  • URL: avatar_cover/mobile_api/cover

Parameters

FieldValueRemarks
session_idAccess token IDExample: de25cc16eb00960f076...
coverImage file (jpg, png, jpeg, gif)Example: image.jpeg

Description

Users can upload or replace their profile cover using this functionality.


3. Change User Profile Cover Position

API Endpoint

  • URL: avatar_cover/mobile_api/cover_reposition

Parameters

FieldValueRemarks
session_idAccess token IDExample: de25cc16eb00960f076...
offset_yPixel offset (integer)Positive or negative values for upward or downward adjustment.

Description

This functionality enables users to reposition their profile cover vertically by specifying an offset in pixels. Adjustments are relative to a standard cover size of 600×200 pixels.


Notes

  • Ensure all required parameters are passed correctly to avoid errors.
  • Use appropriate access tokens for authentication.
  • Response structures for each API call are determined by the TTWrite backend and will confirm success or return error details.