Get Balance

This request retrieves the balance information of the user.

HTTP Request

URLMethodDescription GET Get balance information

Sample Request


#creating session
my_session = requests.Session()

#Retrieving the XSRF Token needed for Session
pingResponse = my_session.get("")

#Import the X-XSRF-Token returned from RememberMeController/ping into the request headers
xsrfToken = pingResponse.headers.get("X-XSRF-TOKEN")
requestHeaders = {"X-XSRF-TOKEN" : xsrfToken}

#Sending a login request and retrieving user information
param = {"username" : username, "password" : password, "remember-me" : stay_logged}"", data = param, headers = requestHeaders)
print("\nRetrieving user info...")
response = my_session.get("").json()

Sample Response

Amongst other information, the response returns the below information on the user and the corresponding credits. Below is also a description of each relevant key that is returned followed by a sample request.

JSON KeyDescription
"username" Returns the username of the authenticated account.
"creditsSpent" Returns the total amount of spent credits.
"creditsAvailable" Returns the current balance of the user.
"userId" Returns the user's unique ID.
"email" Returns the user's email.
   "username: t****


In case of error, information maybe derived by the HTTP Status in the result of the request. (e.g. HTTP 400 - Bad Request).

Back to Top