Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sportsxapp.com/llms.txt

Use this file to discover all available pages before exploring further.

6 operations. See the auth & 2fa guide for worked examples.

confirm2_fa

Mutation — returns LoginResult. GraphQL field: confirm2Fa User submitting the 2FA code in order to login. Parameters
NameTypeRequiredDescription
codestrYesThe 2FA code that was sent to the user by email.
session_idstrYesThe id of the session to confirm 2FA for.
timestampintNoThe timestamp of the confirmation.
emailstrYesThe email of the user that the confirmation is being made for.
Example
result = client.confirm2_fa(params={"code": ..., "session_id": ..., "timestamp": ..., "email": ...}, selections=Selection(...))

login

Mutation — returns LoginResult. Login to the platform using the credentials. Please note that if the user has 2FA enabled the actual login will occur when the 2FA code is confirmed in another call to the API. Parameters
NameTypeRequiredDescription
credentialsLoginCredentials (dict — see below)YesThe credentials to use to log into the system.
credentials accepts a dict with these keys (pass as params={"credentials": {...}}):
FieldTypeRequiredDescription
emailstrNoThe email of the user.
usernamestrNoThe username of the user.
passwordstrYesThe password for the given email username.
device_infoDeviceInfoNoThe information about the device that the user is logging in on.
Example
result = client.login(params={"credentials": ...}, selections=Selection(...))

logout

Mutation — returns LogoutResult. Logout of the platform on a specific device, invalidating all tokens. Parameters
NameTypeRequiredDescription
device_infoDeviceInfo (dict — see below)NoThe information on the device to log out.
device_info accepts a dict with these keys (pass as params={"device_info": {...}}):
FieldTypeRequiredDescription
device_idstrNoThe unique id of the device from the device itself.
Example
result = client.logout(params={"device_info": ...}, selections=Selection(...))

new_token

Mutation — returns LoginResult. GraphQL field: newToken Create a new authorization token from the user’s refresh token. Parameters
NameTypeRequiredDescription
refresh_tokenstrYes
Example
result = client.new_token(params={"refresh_token": ...}, selections=Selection(...))

resend2_fa

Mutation — returns TwoFactorAuthResult. GraphQL field: resend2Fa Request that another 2FA code be sent when apparently the user didnt get the code. Parameters
NameTypeRequiredDescription
session_idstrYesThe session id to resend the code for.
emailstrYesThe user id to resend the code for. The system will find the email for the user.
Example
result = client.resend2_fa(params={"session_id": ..., "email": ...}, selections=Selection(...))

send2_fa

Mutation — returns TwoFactorAuthResult. GraphQL field: send2Fa Request a new 2FA code providing the reason - i.e. updating user profile for example. The reasons are enums defined above. Example
result = client.send2_fa(selections=Selection(...))

Types

Reusable dict shapes referenced by the operations above. Pass as plain Python dicts; the SDK translates snake_case keys to the wire format.

DeviceInfo

Contains information on a device registered in the system.
FieldTypeRequiredDescription
device_idstrNoThe unique id of the device from the device itself.