Get Balance

This request retrieves the balance information of the user.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/UserInfo GET Get balance information

Sample Request

PythonOther

#creating session
my_session = requests.Session()

#Retrieving the XSRF Token needed for Session
pingResponse = my_session.get("https://app.tellody.com/CampaignCloud/RememberMeController/ping")

#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}
my_session.post("https://app.tellody.com/CampaignCloud/login", data = param, headers = requestHeaders)
print("\nRetrieving user info...")
response = my_session.get("https://app.tellody.com/CampaignCloud/UserInfo").json()
print(json.dumps(response,ensure_ascii=False))

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****
   "creditsSpent":10.0,
   "creditsAvailable":90.0,
   "userId":1,
   "email":"a.g****@msensis.com",
   
   ....
}

Errors

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