Get user profile
const url = 'https://api.fxtwitter.com/2/profile/X?about_account=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.fxtwitter.com/2/profile/X?about_account=1'Returns profile fields for a user. Optional about_account / aboutAccount (truthy) adds about_account on the user when available.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
XUsername without @, or numeric user id as id:<rest_id> (e.g. id:783214). Case-insensitive id: prefix.
Query Parameters
Section titled “Query Parameters ”Example
1If truthy, include about_account on author when available
Alias for about_account
Responses
Section titled “ Responses ”Profile (check code)
object
object
Discriminator: full user profile (API v2).
object
object
Facet kind: e.g. url, mention, hashtag, bold, media, custom_emoji (Mastodon custom emoji image)
Start and end UTF-16 indices
object
object
object
object
object
Set to suspended when the user is suspended; omitted for plain not found.
Numeric user id when the upstream payload includes it.
Example
{ "user": { "type": "profile", "verification": { "type": "organization" } }, "reason": "suspended"}Invalid path or query parameters
object
Example
{ "code": 400}User not found, suspended (reason: suspended, message: User is suspended), or unavailable
object
object
Discriminator: full user profile (API v2).
object
object
Facet kind: e.g. url, mention, hashtag, bold, media, custom_emoji (Mastodon custom emoji image)
Start and end UTF-16 indices
object
object
object
object
object
Set to suspended when the user is suspended; omitted for plain not found.
Numeric user id when the upstream payload includes it.
Example
{ "user": { "type": "profile", "verification": { "type": "organization" } }, "reason": "suspended"}