Sends a friend request to a user identified by username tag (username#discriminator). Returns the new relationship object. Can fail if user not found or request already sent.
curl --request POST \
--url https://api.fluxer.app/v1/users/@me/relationships \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"discriminator": "<string>"
}
'{
"id": "<string>",
"type": 1,
"user": {
"id": "<string>",
"username": "<string>",
"discriminator": "<string>",
"global_name": "<string>",
"avatar": "<string>",
"avatar_color": 1073741823,
"flags": 1073741823,
"bot": true,
"system": true
},
"nickname": "<string>",
"since": "2023-11-07T05:31:56Z"
}Bot token: Authorization: Bot <token>. This is the primary authentication method for bot applications.
Success
The unique identifier for the relationship
The type of relationship (friend, blocked, pending, etc.)
1, 2, 3, 4 Show child attributes
A custom nickname set for the related user
ISO8601 timestamp of when the relationship was established
curl --request POST \
--url https://api.fluxer.app/v1/users/@me/relationships \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"discriminator": "<string>"
}
'{
"id": "<string>",
"type": 1,
"user": {
"id": "<string>",
"username": "<string>",
"discriminator": "<string>",
"global_name": "<string>",
"avatar": "<string>",
"avatar_color": 1073741823,
"flags": 1073741823,
"bot": true,
"system": true
},
"nickname": "<string>",
"since": "2023-11-07T05:31:56Z"
}