users_retrieve_by_username
GET
/api/users/{username}/
const url = 'https://example.com/api/users/example/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://example.com/api/users/example/ \ --header 'Authorization: Bearer <token>'Retrieve a user by their username.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”username
required
string
Responses
Section titled “Responses”Media typeapplication/json
Serializer for the MadbotUser model.
object
id
required
string format: uuid
username
required
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
string
email
required
Email address
string format: email
first_name
string
last_name
string
is_signup_incomplete
required
boolean
social_accounts
required
Retrieve the social accounts associated with the user.
Array<object>
object
key
additional properties
impersonation
required
Return active impersonation session data if the request token is an impersonation token.
Checks whether the current request’s OAuth2 token matches an active
:class:~madbot_api.core.models.ImpersonateSession. Returns None
for all normal (non-impersonated) requests, or when the serializer
is used without a request context (e.g. in tests or admin).
object
key
additional properties
ror
required
string
orcid
string
last_workspace
string
last_path
string
Example generated
{ "first_name": "example", "last_name": "example", "ror": "example", "orcid": "example", "last_workspace": "example", "last_path": "example"}
