API REFERENCE
Authentication
Refresh Access Token
1 min
{ "name" "refresh", "method" "get", "url" "https //api sandbox klavi ai/monitor/v1/refresh", "description" "refresh the access token", "tab" "examples", "examples" { "languages" \[ { "id" " rnndmqhkhhk1hx f0kgx", "language" "curl", "code" "curl location 'https //api sandbox klavi ai/monitor/v1/refresh' \\\\\n header 'authorization string'", "customlabel" "" }, { "id" "krf222ocgttimjbvwayqp", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/monitor/v1/refresh',\n 'headers' {\n 'authorization' 'string'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "xt9gzu1rpmf6sr7iscizp", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //api sandbox klavi ai/monitor/v1/refresh\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "pagev ucrb9mzkusovpgs", "language" "python", "code" "import requests\n\nurl = \\"https //api sandbox klavi ai/monitor/v1/refresh\\"\n\npayload = {}\nheaders = {\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "s6m2s4k 67loblystqzkm", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/monitor/v1/refresh\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"authorization\\"] = \\"string\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" " rnndmqhkhhk1hx f0kgx" }, "results" { "languages" \[ { "id" "nv95bdk0hffiaqleksznn", "language" "200", "customlabel" "", "code" "{\n \\"accesstoken\\" \\"jhbgcioijfuzi1niis qtyjayoc1hn2zhmwfjzgrjzjkilcj0 nltqpazheq4p2xfd\\",\n \\"expirein\\" 1800\n}" } ], "selectedlanguageid" "nv95bdk0hffiaqleksznn" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "bearer access token, it returned by the /auth", "" "bearer access token, it returned by the /auth" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" }, "hastryitout" false, "response" \[ { "name" "accesstoken", "kind" "optional", "type" "string", "description" "jwt token" }, { "name" "expirein", "kind" "optional", "type" "string", "description" "token validity duration, default 1800 seconds", "children" \[] } ] }