{"_id":"55812f9aa5474a0d00d943ee","project":"54eb50e5615ffc1900305a16","category":{"_id":"56d8147c3eb4dd0b00201aac","project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","__v":0,"pages":[],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-03T10:39:56.158Z","from_sync":false,"order":20,"slug":"settings","title":"Settings"},"user":"54eb4fdedf7add210007b29b","parentDoc":null,"__v":14,"version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-06-17T08:28:10.147Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"json","code":"GET /account/1/balance HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json","name":""},{"language":"xml","code":"GET /account/1/balance HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml"},{"language":"curl","code":"curl -X GET \\\n-H 'Accept: application/json' \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\nhttps://api.infobip.com/account/1/balance"},{"language":"php","code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.infobip.com/account/1/balance');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders(array(\n  'accept' => 'application/json',\n  'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/account/1/balance\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"code":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n    'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n    'accept': \"application/json\"\n    }\n\nconn.request(\"GET\", \"/account/1/balance\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))","language":"python"},{"code":"HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/account/1/balance\")\n  .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n  .header(\"accept\", \"application/json\")\n  .asString();","language":"java"},{"code":"var client = new RestClient(\"https://api.infobip.com/account/1/balance\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);","language":"csharp"},{"code":"var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/account/1/balance\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);","language":"javascript"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"balance\": 47.79134,\n  \"currency\": \"EUR\"\n}","name":"OK JSON"},{"code":"HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<accountBalance>\n    <balance>47.79134</balance>\n    <currency>EUR</currency>\n</accountBalance>","language":"xml","status":200,"name":"OK XML"},{"code":"","language":"text","status":400}]},"settings":"","auth":"required","params":[],"url":"/account/:version/balance"},"isReference":true,"order":7,"body":"# Response format\n\nOn success, the response header HTTP status code will be `200 OK` and delivery reports will be returned in the response body.\n\nIf you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`.\n\n### AccountBalance\n\n|Parameter|Type|Description|\n|-|-|-|\n|*balance*|Double|Account balance.|\n|*currency*|String|The currency in which the account balance is expressed.|","excerpt":"This method allows you to get your account balance.","slug":"account-balance","type":"endpoint","title":"Get account balance"}

getGet account balance

This method allows you to get your account balance.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format


Documentation

# Response format On success, the response header HTTP status code will be `200 OK` and delivery reports will be returned in the response body. If you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`. ### AccountBalance |Parameter|Type|Description| |-|-|-| |*balance*|Double|Account balance.| |*currency*|String|The currency in which the account balance is expressed.|

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}