{"__v":3,"_id":"5693a7995f1c951900644b25","category":{"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","_id":"56d8147c3eb4dd0b00201aac","pages":[],"__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-03T10:39:56.158Z","from_sync":false,"order":15,"slug":"settings","title":"Settings"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":20,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","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"],"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":"2016-01-11T13:01:13.109Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n","language":"json"},{"code":"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/xml\nAccept: application/xml\n","language":"xml"},{"code":"curl -H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" -H \"Content-Type: application/json\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8'","language":"curl"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\")\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[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n    'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"GET\", \"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"java","code":"HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\")\n  .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n  .header(\"content-type\", \"application/json\")\n  .asString();"},{"language":"csharp","code":"var client = new RestClient(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nIRestResponse response = client.Execute(request);"},{"language":"javascript","code":"var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys/C6DFA0B215B2CF24EF04794F718A3FC8\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n    \"name\": \"Api key 1\",\n  \t\"key\": \"C6DFA0B215B2CF24EF04794F718A3FC8\",\n    \"publicApiKey\": \"7bd7d59cfe90e4d32b1d2f20d39c86df-fbaa8670-1008-ac7a-398a-3c11ac797c77\",\n    \"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n    \"allowedIPs\": [\n        \"127.0.0.1\",\n        \"192.168.1.1\"\n    ],\n    \"validFrom\": \"2015-02-12T09:58:20.323+0100\",\n    \"validTo\": \"2016-02-12T09:58:20.323+0100\",\n    \"enabled\": true\n}","language":"json","status":200},{"name":"OK - XML","code":"<?xml version='1.0' encoding='UTF-8'?>\n<apiKey>\n  \t<key>C6DFA0B215B2CF24EF04794F718A3FC8</key>\n    <publicApiKey>d0f64a8194b48b8bb2b86e6385d22792-5af80fc8-44b0-4998-9b64-d850f659bc97</apiKey>\n    <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n    <name>Api key 1</name>\n    <allowedIPs>\n        <allowedIP>127.0.0.1</allowedIP>\n        <allowedIP>192.168.1.1</allowedIP>\n    </allowedIPs>\n    <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\n\t\t<validTo>2016-02-12T09:58:20.323+0100</validTo>\n    <enabled>true</enabled>\n</apiKey>","language":"xml","status":200},{"status":400,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"BAD_REQUEST\",\n      \"text\": \"Bad request\"\n    }\n  }\n}"}]},"settings":"","auth":"required","params":[{"_id":"568b907a0b857d1900905f8d","ref":"","in":"path","required":true,"desc":"Account key","default":"","type":"string","name":"accountKey"},{"_id":"5693b6825f1c951900644b39","ref":"","in":"path","required":false,"desc":"Key used to uniquely identify ApiKey","default":"","type":"string","name":"key"},{"_id":"568b907a0b857d1900905f8c","ref":"","in":"query","required":false,"desc":"ApiKey name","default":"","type":"string","name":"name"},{"_id":"568b907a0b857d1900905f8b","ref":"","in":"query","required":false,"desc":"ApiKey value","default":"","type":"string","name":"publicApiKey"},{"_id":"5693b6825f1c951900644b38","ref":"","in":"query","required":false,"desc":"Status of ApiKey (enabled/disabled)","default":"","type":"boolean","name":"enabled"},{"_id":"5693b6825f1c951900644b37","ref":"","in":"query","required":false,"desc":"Number of ApiKeys to fetch","default":"","type":"int","name":"limit"}],"url":"/settings/:version/accounts/:accountKey/api-keys/:key"},"isReference":true,"order":5,"body":"# Response format \n\nIf successful, response header HTTP status code will be `200 OK` and the API key will be fetched.\n\nIf you try to get API key(s) without authorization, you will receive an `401 Unauthorized` error.\n\n### Api Key\n\n|Parameter|Type|Description|\n|-|-|-|\n|*name*|String|Api key name.|\n|*key*|String|Key used to uniquely identify API key.|\n|*publicApiKey*|String|Generated API Key for authorization.|\n|*accountKey*|String|Account key that generated API key belongs to.|\n|*allowedIPs*|String[]|Array of allowed IP addresses for API call origin. If allowedIPs is not included, there will be no IP restrictions for API requests.|\n|*validFrom*|Date|Date since the APi key is valid.|\n|*validTo*|Date|Date until the APi key is valid.|\n|*enabled*|Boolean|Whether API key is enabled for use.|\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional examples\"\n}\n[/block]\n# Get all ApiKeys\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If **all** ApiKeys are wanted, **key** parameter must be omitted.\"\n}\n[/block]\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/xml\\nAccept: application/xml\\n\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" -H \\\"Content-Type: application/json\\\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\")\\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[\\\"content-type\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'content-type': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"content-type\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\");\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"content-type\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"content-type\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"apiKeys\\\": [{\\n\\t\\t\\\"name\\\": \\\"Api key 1\\\",\\n\\t\\t\\\"key\\\": \\\"C6DFA0B215B2CF24EF04794F718A3FC8\\\",\\n\\t\\t\\\"publicApiKey\\\": \\\"7bd7d59cfe90e4d32b1d2f20d39c86df-fbaa8670-1008-ac7a-398a-3c11ac797c77\\\",\\n\\t\\t\\\"accountKey\\\": \\\"D0F64A8194B48B8BB2B86E6385D22792\\\",\\n\\t\\t\\\"allowedIPs\\\": [\\n\\t\\t\\t\\\"127.0.0.1\\\",\\n\\t\\t\\t\\\"192.168.1.1\\\"\\n\\t\\t],\\n\\t\\t\\\"validFrom\\\": \\\"2015-02-12T09:58:20.323+0100\\\",\\n\\t\\t\\\"validTo\\\": \\\"2016-02-12T09:58:20.323+0100\\\",\\n\\t\\t\\\"enabled\\\": true\\n\\t}, {\\n\\t\\t\\\"name\\\": \\\"Api key 2\\\",\\n\\t\\t\\\"key\\\": \\\"9C815F8AF3328A8194B48B8BB2B86E62\\\",\\n\\t\\t\\\"publicApiKey\\\": \\\"fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a\\\",\\n\\t\\t\\\"accountKey\\\": \\\"D0F64A8194B48B8BB2B86E6385D22792\\\",\\n\\t\\t\\\"allowedIPs\\\": [\\n\\t\\t\\t\\\"127.0.0.1\\\",\\n\\t\\t\\t\\\"192.168.1.1\\\"\\n\\t\\t],\\n\\t\\t\\\"validFrom\\\": \\\"2015-02-12T09:58:20.323+0100\\\",\\n\\t\\t\\\"validTo\\\": \\\"2016-09-12T07:58:20.323+0100\\\",\\n\\t\\t\\\"enabled\\\": true\\n\\t}, {\\n\\t\\t\\\"name\\\": \\\"Api key 3\\\",\\n\\t\\t\\\"key\\\": \\\"28A8194B48B8BB2B86E629C815F8AF33\\\",\\n\\t\\t\\\"publicApiKey\\\": \\\"a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\",\\n\\t\\t\\\"accountKey\\\": \\\"D0F64A8194B48B8BB2B86E6385D22792\\\",\\n\\t\\t\\\"validFrom\\\": \\\"2015-12-12T09:58:20.323+0100\\\",\\n\\t\\t\\\"enabled\\\": false\\n\\t}]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - JSON\"\n    },\n    {\n      \"code\": \"<?xml version='1.0' encoding='UTF-8'?>\\n<apiKeysResponse>\\n  <apiKeys>\\n    <apiKey>\\n      <name>Api key 1</name>\\n      <key>C6DFA0B215B2CF24EF04794F718A3FC8</key>\\n      <publicApiKey>d0f64a8194b48b8bb2b86e6385d22792-5af80fc8-44b0-4998-9b64-d850f659bc97</publicApiKey>\\n      <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\\n      <allowedIPs>\\n          <allowedIP>127.0.0.1</allowedIP>\\n          <allowedIP>192.168.1.1</allowedIP>\\n      </allowedIPs>\\n      <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\\n      <validTo>2016-02-12T09:58:20.323+0100</validTo>\\n      <enabled>true</enabled>\\n    </apiKey>\\n    <apiKey>\\n      <name>Api key 2</name>\\n      <key>9C815F8AF3328A8194B48B8BB2B86E62</key>\\n      <publicApiKey>fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a</publicApiKey>\\n      <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\\n      <allowedIPs>\\n          <allowedIP>127.0.0.1</allowedIP>\\n          <allowedIP>192.168.1.1</allowedIP>\\n      </allowedIPs>\\n      <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\\n      <validTo>2016-09-12T07:58:20.323+0100</validTo>\\n      <enabled>true</enabled>\\n    </apiKey>\\n    <apiKey>\\n      <name>Api key 3</name>\\n      <key>28A8194B48B8BB2B86E629C815F8AF33</key>\\n      <publicApiKey>a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a</publicApiKey>\\n      <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\\n      <allowedIPs>\\n          <allowedIP>127.0.0.1</allowedIP>\\n          <allowedIP>192.168.1.1</allowedIP>\\n      </allowedIPs>\\n      <validFrom>2015-12-12T09:58:20.323+0100</validFrom>\\n      <enabled>false</enabled>\\n    </apiKey>\\n  </apiKeys>\\n</apiKeysResponse>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - XML\"\n    }\n  ]\n}\n[/block]\n## Response format \n\nIf successful, response header HTTP status code will be `200 OK` and all api keys will be returned.\n\nIf you try to get the api keys without authorization, you will receive an `401 Unauthorized` error.\n\n### Api Key Response\n|Parameter|Type|Description|\n|-|-|-|\n|*apiKeys*|[ApiKey[]](#section-api-key)|Array of api keys.|\n\n# Get api key by name\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Usage of **key** and **name**, **enabled** and **publicApiKey** parameters is **exclusive**. With *key* **path** parameter, specific api key is returned, but with **query** parameter *name* (or *enabled*, or *publicApiKey*), list of api keys is returned, filtered by specified parameter value.\",\n  \"title\": \"Caution!\"\n}\n[/block]\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" -H \\\"Content-Type: application/json\\\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\")\\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[\\\"content-type\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'content-type': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"content-type\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\");\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"content-type\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"content-type\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"Api key 2\\\",\\n  \\\"key\\\": \\\"9C815F8AF3328A8194B48B8BB2B86E62\\\",\\n  \\\"publicApiKey\\\": \\\"fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a\\\",\\n  \\\"accountKey\\\": \\\"D0F64A8194B48B8BB2B86E6385D22792\\\",\\n  \\\"allowedIPs\\\": [\\n    \\\"127.0.0.1\\\",\\n    \\\"192.168.1.1\\\"\\n  ],\\n  \\\"validFrom\\\": \\\"2015-02-12T09:58:20.323+0100\\\",\\n  \\\"validTo\\\": \\\"2016-09-12T07:58:20.323+0100\\\",\\n  \\\"enabled\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - JSON\"\n    },\n    {\n      \"code\": \"<?xml version='1.0' encoding='UTF-8'?>\\n<apiKey>\\n  <name>Api key 2</name>\\n  <key>9C815F8AF3328A8194B48B8BB2B86E62</key>\\n  <publicApiKey>fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a</publicApiKey>\\n  <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\\n  <allowedIPs>\\n    <allowedIP>127.0.0.1</allowedIP>\\n    <allowedIP>192.168.1.1</allowedIP>\\n  </allowedIPs>\\n  <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\\n  <validTo>2016-09-12T07:58:20.323+0100</validTo>\\n  <enabled>true</enabled>\\n</apiKey>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - XML\"\n    }\n  ]\n}\n[/block]\n# Get api key by it's publicApiKey value\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" -H \\\"Content-Type: application/json\\\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\")\\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[\\\"content-type\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'content-type': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"content-type\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\");\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"content-type\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"content-type\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"Api key 3\\\",\\n  \\\"key\\\": \\\"28A8194B48B8BB2B86E629C815F8AF33\\\",\\n  \\\"publicApiKey\\\": \\\"a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\\\",\\n  \\\"accountKey\\\": \\\"D0F64A8194B48B8BB2B86E6385D22792\\\",\\n  \\\"validFrom\\\": \\\"2015-12-12T09:58:20.323+0100\\\",\\n  \\\"enabled\\\": false\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - JSON\"\n    },\n    {\n      \"code\": \"<?xml version='1.0' encoding='UTF-8'?>\\n<apiKey>\\n  <name>Api key 3</name>\\n  <key>28A8194B48B8BB2B86E629C815F8AF33</key>\\n  <publicApiKey>a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a</publicApiKey>\\n  <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\\n  <allowedIPs>\\n    <allowedIP>127.0.0.1</allowedIP>\\n    <allowedIP>192.168.1.1</allowedIP>\\n  </allowedIPs>\\n  <validFrom>2015-12-12T09:58:20.323+0100</validFrom>\\n  <enabled>false</enabled>\\n</apiKey>\",\n      \"language\": \"xml\",\n      \"name\": \"200 OK - XML\"\n    }\n  ]\n}\n[/block]","excerpt":"This method allows you to get API keys. Specific, all, and filtered API keys could be fetched with this method.","slug":"apikey-get","type":"endpoint","title":"ApiKey: Get"}

getApiKey: Get

This method allows you to get API keys. Specific, all, and filtered API keys could be fetched with this method.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

accountKey:
required
string
Account key
key:
string
Key used to uniquely identify ApiKey

Query Params

name:
string
ApiKey name
publicApiKey:
string
ApiKey value
enabled:
boolean
Status of ApiKey (enabled/disabled)
limit:
integer
Number of ApiKeys to fetch

Examples


Result Format


Documentation

# Response format If successful, response header HTTP status code will be `200 OK` and the API key will be fetched. If you try to get API key(s) without authorization, you will receive an `401 Unauthorized` error. ### Api Key |Parameter|Type|Description| |-|-|-| |*name*|String|Api key name.| |*key*|String|Key used to uniquely identify API key.| |*publicApiKey*|String|Generated API Key for authorization.| |*accountKey*|String|Account key that generated API key belongs to.| |*allowedIPs*|String[]|Array of allowed IP addresses for API call origin. If allowedIPs is not included, there will be no IP restrictions for API requests.| |*validFrom*|Date|Date since the APi key is valid.| |*validTo*|Date|Date until the APi key is valid.| |*enabled*|Boolean|Whether API key is enabled for use.| [block:api-header] { "type": "basic", "title": "Additional examples" } [/block] # Get all ApiKeys [block:callout] { "type": "info", "body": "If **all** ApiKeys are wanted, **key** parameter must be omitted." } [/block] **Request** [block:code] { "codes": [ { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n", "language": "json" }, { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/xml\nAccept: application/xml\n", "language": "xml" }, { "code": "curl -H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" -H \"Content-Type: application/json\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys'", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\")\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[\"content-type\"] = '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 'content-type': \"application/json\"\n }\n\nconn.request(\"GET\", \"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\", 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"content-type\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n\t\"apiKeys\": [{\n\t\t\"name\": \"Api key 1\",\n\t\t\"key\": \"C6DFA0B215B2CF24EF04794F718A3FC8\",\n\t\t\"publicApiKey\": \"7bd7d59cfe90e4d32b1d2f20d39c86df-fbaa8670-1008-ac7a-398a-3c11ac797c77\",\n\t\t\"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n\t\t\"allowedIPs\": [\n\t\t\t\"127.0.0.1\",\n\t\t\t\"192.168.1.1\"\n\t\t],\n\t\t\"validFrom\": \"2015-02-12T09:58:20.323+0100\",\n\t\t\"validTo\": \"2016-02-12T09:58:20.323+0100\",\n\t\t\"enabled\": true\n\t}, {\n\t\t\"name\": \"Api key 2\",\n\t\t\"key\": \"9C815F8AF3328A8194B48B8BB2B86E62\",\n\t\t\"publicApiKey\": \"fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a\",\n\t\t\"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n\t\t\"allowedIPs\": [\n\t\t\t\"127.0.0.1\",\n\t\t\t\"192.168.1.1\"\n\t\t],\n\t\t\"validFrom\": \"2015-02-12T09:58:20.323+0100\",\n\t\t\"validTo\": \"2016-09-12T07:58:20.323+0100\",\n\t\t\"enabled\": true\n\t}, {\n\t\t\"name\": \"Api key 3\",\n\t\t\"key\": \"28A8194B48B8BB2B86E629C815F8AF33\",\n\t\t\"publicApiKey\": \"a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\",\n\t\t\"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n\t\t\"validFrom\": \"2015-12-12T09:58:20.323+0100\",\n\t\t\"enabled\": false\n\t}]\n}", "language": "json", "name": "200 OK - JSON" }, { "code": "<?xml version='1.0' encoding='UTF-8'?>\n<apiKeysResponse>\n <apiKeys>\n <apiKey>\n <name>Api key 1</name>\n <key>C6DFA0B215B2CF24EF04794F718A3FC8</key>\n <publicApiKey>d0f64a8194b48b8bb2b86e6385d22792-5af80fc8-44b0-4998-9b64-d850f659bc97</publicApiKey>\n <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n <allowedIPs>\n <allowedIP>127.0.0.1</allowedIP>\n <allowedIP>192.168.1.1</allowedIP>\n </allowedIPs>\n <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\n <validTo>2016-02-12T09:58:20.323+0100</validTo>\n <enabled>true</enabled>\n </apiKey>\n <apiKey>\n <name>Api key 2</name>\n <key>9C815F8AF3328A8194B48B8BB2B86E62</key>\n <publicApiKey>fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a</publicApiKey>\n <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n <allowedIPs>\n <allowedIP>127.0.0.1</allowedIP>\n <allowedIP>192.168.1.1</allowedIP>\n </allowedIPs>\n <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\n <validTo>2016-09-12T07:58:20.323+0100</validTo>\n <enabled>true</enabled>\n </apiKey>\n <apiKey>\n <name>Api key 3</name>\n <key>28A8194B48B8BB2B86E629C815F8AF33</key>\n <publicApiKey>a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a</publicApiKey>\n <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n <allowedIPs>\n <allowedIP>127.0.0.1</allowedIP>\n <allowedIP>192.168.1.1</allowedIP>\n </allowedIPs>\n <validFrom>2015-12-12T09:58:20.323+0100</validFrom>\n <enabled>false</enabled>\n </apiKey>\n </apiKeys>\n</apiKeysResponse>", "language": "xml", "name": "200 OK - XML" } ] } [/block] ## Response format If successful, response header HTTP status code will be `200 OK` and all api keys will be returned. If you try to get the api keys without authorization, you will receive an `401 Unauthorized` error. ### Api Key Response |Parameter|Type|Description| |-|-|-| |*apiKeys*|[ApiKey[]](#section-api-key)|Array of api keys.| # Get api key by name [block:callout] { "type": "warning", "body": "Usage of **key** and **name**, **enabled** and **publicApiKey** parameters is **exclusive**. With *key* **path** parameter, specific api key is returned, but with **query** parameter *name* (or *enabled*, or *publicApiKey*), list of api keys is returned, filtered by specified parameter value.", "title": "Caution!" } [/block] **Request** [block:code] { "codes": [ { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n", "language": "json" }, { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n", "language": "xml" }, { "code": "curl -H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" -H \"Content-Type: application/json\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2'", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\")\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[\"content-type\"] = '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 'content-type': \"application/json\"\n }\n\nconn.request(\"GET\", \"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\", 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"content-type\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?name=Api+key+2\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"name\": \"Api key 2\",\n \"key\": \"9C815F8AF3328A8194B48B8BB2B86E62\",\n \"publicApiKey\": \"fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a\",\n \"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n \"allowedIPs\": [\n \"127.0.0.1\",\n \"192.168.1.1\"\n ],\n \"validFrom\": \"2015-02-12T09:58:20.323+0100\",\n \"validTo\": \"2016-09-12T07:58:20.323+0100\",\n \"enabled\": true\n}", "language": "json", "name": "200 OK - JSON" }, { "code": "<?xml version='1.0' encoding='UTF-8'?>\n<apiKey>\n <name>Api key 2</name>\n <key>9C815F8AF3328A8194B48B8BB2B86E62</key>\n <publicApiKey>fe90e4d32b1d2f20d39c86df7bd7d59c-a8670fba-1108-398a-ac7a-c797c773c11a</publicApiKey>\n <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n <allowedIPs>\n <allowedIP>127.0.0.1</allowedIP>\n <allowedIP>192.168.1.1</allowedIP>\n </allowedIPs>\n <validFrom>2015-02-12T09:58:20.323+0100</validFrom>\n <validTo>2016-09-12T07:58:20.323+0100</validTo>\n <enabled>true</enabled>\n</apiKey>", "language": "xml", "name": "200 OK - XML" } ] } [/block] # Get api key by it's publicApiKey value **Request** [block:code] { "codes": [ { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n", "language": "json" }, { "code": "GET settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n", "language": "xml" }, { "code": "curl -H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" -H \"Content-Type: application/json\" 'https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a'", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\")\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[\"content-type\"] = '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 'content-type': \"application/json\"\n }\n\nconn.request(\"GET\", \"/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\", 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"content-type\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var 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/settings/1/accounts/D0F64A8194B48B8BB2B86E6385D22792/api-keys?publicApiKey=a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"name\": \"Api key 3\",\n \"key\": \"28A8194B48B8BB2B86E629C815F8AF33\",\n \"publicApiKey\": \"a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a\",\n \"accountKey\": \"D0F64A8194B48B8BB2B86E6385D22792\",\n \"validFrom\": \"2015-12-12T09:58:20.323+0100\",\n \"enabled\": false\n}", "language": "json", "name": "200 OK - JSON" }, { "code": "<?xml version='1.0' encoding='UTF-8'?>\n<apiKey>\n <name>Api key 3</name>\n <key>28A8194B48B8BB2B86E629C815F8AF33</key>\n <publicApiKey>a20d39c86df7bd7d59cfe90e4d32b1d2-a8670fba-ae02-afe3-1035-c7aef812411a</publicApiKey>\n <accountKey>D0F64A8194B48B8BB2B86E6385D22792</accountKey>\n <allowedIPs>\n <allowedIP>127.0.0.1</allowedIP>\n <allowedIP>192.168.1.1</allowedIP>\n </allowedIPs>\n <validFrom>2015-12-12T09:58:20.323+0100</validFrom>\n <enabled>false</enabled>\n</apiKey>", "language": "xml", "name": "200 OK - XML" } ] } [/block]

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 }}