Skip to main content
POST
Privy refreshes a user’s Twitter profile data whenever they log in or re-authorize their Twitter account. Use this endpoint to refresh that data for users with an existing session, who will not re-authenticate soon. Privy only overwrites a field when Twitter returns a value for it. If Twitter omits username, name, or profile_picture_url, the existing value on the linked account is preserved rather than set to null.

Body

string
required
The Twitter user ID of the account to refresh, as stored on the subject field of the user’s twitter_oauth linked account. This is Twitter’s stable numeric identifier for the account, not the account’s username.

Returns

The refreshed twitter_oauth linked account. This endpoint does not return the full user object.
string
required
Available options: twitter_oauth
string
required
The Twitter user ID of the account. This value is stable and does not change when the user changes their username.
string | null
required
The user’s Twitter username.
string | null
required
The user’s display name on Twitter.
string | null
required
A URL for the user’s Twitter profile picture.
number
required
Unix timestamp, in seconds, of when the user linked their Twitter account to their Privy account.
number | null
required
Unix timestamp, in seconds, of when the user first linked their Twitter account.
number | null
required
Unix timestamp, in seconds, of when the user most recently linked their Twitter account.

Errors

Two distinct conditions share each of the 404 and 429 statuses. Your app should branch on the error message, not the status alone. None of these responses include a Retry-After header. Both 429 responses include the error code too_many_requests. The 404 and 500 responses do not include an error code.