User Profile Operations
This section covers GraphQL operations related to user profile management.
Queries​
Current User​
Retrieves the profile information for the currently authenticated user.
query CurrentUser {
currentUser {
id
username
firstName
lastName
fullName
profilePhoto
coverPhoto
biography
hidden
preferredFiatCurrency
preferredLang
createdAt
emailVerifiedAt
phoneVerifiedAt
email
chatRole
contactSms
contactEmail
contactApp
mfaInfo {
enabled
type
enabledAt
}
kycInfo {
kycIdvStatus
kycPoaStatus
verifiedAt
poaVerifiedAt
}
}
}
Response:
{
"data": {
"currentUser": {
"id": "user-id",
"username": "johndoe",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"profilePhoto": "https://example.com/profile.jpg",
"coverPhoto": "https://example.com/cover.jpg",
"biography": "Software developer",
"hidden": false,
"preferredFiatCurrency": "USD",
"preferredLang": "EN",
"createdAt": "2023-01-01T00:00:00Z",
"emailVerifiedAt": "2023-01-02T00:00:00Z",
"phoneVerifiedAt": "2023-01-02T00:00:00Z",
"email": "john@example.com",
"chatRole": "USER",
"contactSms": true,
"contactEmail": true,
"contactApp": true
"mfaInfo": {
"enabled": true,
"type": "AUTHENTICATOR",
"enabledAt": "2023-01-03T00:00:00Z"
},
"kycInfo": {
"kycIdvStatus": "VERIFIED",
"kycPoaStatus": "VERIFIED",
"verifiedAt": "2023-01-04T00:00:00Z",
"poaVerifiedAt": "2023-01-04T00:00:00Z"
}
}
}
}
Get Bet By Token​
Retrieves a bet token for the current user.
query GetBetByToken {
getBetByToken {
token
}
}
Response:
{
"data": {
"getBetByToken": {
"token": "bet-token-string"
}
}
}
Mutations​
Edit User Details​
Updates the profile information for the currently authenticated user.
mutation EditUserDetail($input: EditUserInput!) {
editUserDetail(input: $input) {
id
username
firstName
lastName
middleName
fullName
avatarUrl
hidden
preferredFiatCurrency
languageCode
countryCode
stateCode
onBoardingCompleted
contactSms
contactEmail
contactApp
}
}
Input Parameters:
{
"input": {
"username": "newusername",
"firstName": "John",
"lastName": "Doe",
"middleName": "Robert",
"avatarFilename": "profile.jpg",
"onBoardingCompleted": true,
"languageCode": "EN",
"countryCode": "US",
"stateCode": "CA",
"hidden": false,
"preferredFiatCurrency": "EUR",
"contactSms": false,
"contactEmail": false,
"contactApp": true
}
}
Response:
{
"data": {
"editUserDetail": {
"id": "user-id",
"username": "newusername",
"firstName": "John",
"lastName": "Doe",
"middleName": "Robert",
"fullName": "John Robert Doe",
"avatarUrl": "https://storage-url.com/user-id/profile.jpg",
"hidden": false,
"preferredFiatCurrency": "EUR",
"languageCode": "EN",
"countryCode": "US",
"stateCode": "CA",
"onBoardingCompleted": true,
"contactSms": false,
"contactEmail": false,
"contactApp": true
}
}
}
All fields in the input are optional, allowing partial updates to the user profile. Note that avatarFilename is transformed into avatarUrl in the response after the file is processed.
Set Self Excluded​
Allows users to self-exclude themselves from the platform for a specified period. This is a responsible gambling feature that helps users take a break from the platform.
mutation SetSelfExcluded($input: SetSelfExcludedInput!) {
setSelfExcluded(input: $input)
}
Input Parameters:
{
"input": {
"period": "ONE_WEEK"
}
}
Response:
{
"data": {
"setSelfExcluded": true
}
}
Supported Periods:
| Value | Description |
|---|---|
ONE_DAY | 1 day exclusion |
ONE_WEEK | 1 week exclusion |
ONE_MONTH | 1 month exclusion |
SIX_MONTHS | 6 months exclusion |
PERMANENT | Permanent exclusion |
Important Notes:
- Self-exclusion is immediate and cannot be reversed during the exclusion period
- All active sessions are automatically deactivated
- Users cannot log in during the exclusion period
- For temporary exclusions, the account will be automatically reactivated after the period ends
- For permanent exclusions, the account remains excluded indefinitely
- This action requires the user to have a valid customer ID (badhombreId)
Field Descriptions​
EditUserInput​
| Field | Type | Description |
|---|---|---|
| firstName | String | User's first name (2-20 characters) |
| lastName | String | User's last name (2-20 characters) |
| middleName | String | User's middle name (2-20 characters) |
| avatarFilename | String | Avatar filename (passing null will remove avatar) |
| onBoardingCompleted | Boolean | Whether onboarding process is completed |
| languageCode | Lang | User's preferred language code (e.g., EN, FR, ES) |
| countryCode | CountryCode | User's country code (e.g., US, CA) |
| stateCode | String | State code (required for US country code) |
| hidden | Boolean | Whether user's bet history and statistics should be hidden |
| preferredFiatCurrency | FiatCurrency | User's preferred currency (e.g., USD, EUR) |
| username | String | User's unique username (2-20 characters) |
| contactEmail | boolean | Whether the user consents to email contact. |
| contactSms | boolean | Whether the user consents to SMS contact. |
| contactApp | boolean | Whether the user consents to Push notifications. |