Onramp API Integration.
Customer login
Refresh Access Token
1 min
{ "tab" "examples", "url" "https //stg api onmeta in/v1/users/refresh token", "name" "get refresh access token", "method" "get", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "x api key", "type" "string", "children" \[], "description" "api key" }, { "kind" "required", "name" "authorization", "type" "string", "children" \[], "description" "bearer \<refreshtoken>" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "b6qoc5q k2igjgmqnh9ub", "code" "{\n \\"success\\" true,\n \\"data\\" {\n \\"accesstoken\\" \\"eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9 jifew232\\"\n },\n \\"error\\" {}\n}", "language" "200", "customlabel" "" }, { "id" "4ohnjsygama0z6scqyems", "code" "{\n \\"success\\" false,\n \\"error\\" {\n \\"code\\" 401,\n \\"message\\" \\"unauthorized to access\\"\n }\n}", "language" "401", "customlabel" "" }, { "id" "2miewqin1cvqcx1qjzpem", "code" "{\n \\"success\\" false,\n \\"error\\" {\n \\"code\\" 500,\n \\"message\\" \\"internal server error\\"\n }\n}", "language" "500", "customlabel" "" } ], "selectedlanguageid" "b6qoc5q k2igjgmqnh9ub" }, "examples" { "languages" \[ { "id" "oiaeysvpqwjavswt9mpak", "code" "curl location request get 'https //stg api onmeta in/v1/users/refresh token' \\\\\n header 'accept application/json' \\\\\n header 'x api key string' \\\\\n header 'authorization string'", "language" "curl", "customlabel" "" }, { "id" "eas05hjqf8tbpb8g0vc3c", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //stg api onmeta in/v1/users/refresh token',\n 'headers' {\n 'accept' 'application/json',\n 'x api key' 'string',\n 'authorization' 'string'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "language" "nodejs", "customlabel" "" }, { "id" "sjwb3eapcdooj3ft0fod9", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"x api key\\", \\"string\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //stg api onmeta in/v1/users/refresh token\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "language" "javascript", "customlabel" "" }, { "id" "m4hotjw1zpzzuldmv0hmf", "code" "import requests\n\nurl = \\"https //stg api onmeta in/v1/users/refresh token\\"\n\npayload={}\nheaders = {\n 'accept' 'application/json',\n 'x api key' 'string',\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "language" "python", "customlabel" "" }, { "id" "ot1hdmnhlrz77qxi0p zv", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //stg api onmeta in/v1/users/refresh token\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"x api key\\"] = \\"string\\"\nrequest\[\\"authorization\\"] = \\"string\\"\n\nresponse = https request(request)\nputs response read body\n", "language" "ruby", "customlabel" "" } ], "selectedlanguageid" "oiaeysvpqwjavswt9mpak" }, "description" "get the refresh access token for a user with refresh token received from user login api request you can get new access tokens and use it in subsequent api's if the earlier access token is expired ", "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } }