Login
2 min
📝 description authenticates the api client and generates an access token the access token is valid for 24 hours and is required to access all protected endpoints it must be included in subsequent requests using the authorization header as a bearer token { "name" "/api/no auth/authentication/v1/login", "method" "post", "url" "https //cloudbreak cambyopro com/api/no auth/authentication/v1/login", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "4pjnhpzs5icfc2imekk5v", "language" "json", "code" "{\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n}" }, { "id" "re6zduow3hx 109krv1sb", "language" "curl", "code" "curl request post \\\\\n url https //cloudbreak cambyopro com/api/no auth/authentication/v1/login \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n }'", "customlabel" "" }, { "id" "46mlyloa2imno9k k0rdd", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //cloudbreak cambyopro com/api/no auth/authentication/v1/login',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "jgdfymkupnqtakangtyrj", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //cloudbreak cambyopro com/api/no auth/authentication/v1/login\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "eo2wsfmrwmaviz09dc2cs", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //cloudbreak cambyopro com/api/no auth/authentication/v1/login\\"\n\npayload = json dumps({\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "gjuoy2kbq4dwltnrdyrmq", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //cloudbreak cambyopro com/api/no auth/authentication/v1/login\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"clientid\\" \\"string\\",\n \\"clientsecret\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "4pjnhpzs5icfc2imekk5v" }, "results" { "languages" \[ { "id" "8awq k4b2jwsr3cwel30t", "language" "200", "code" "{\n \\"success\\" true,\n \\"accesstoken\\" \\"atk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\",\n \\"tokentype\\" \\"bearer\\",\n \\"message\\" \\"cliente de api autenticado com sucesso para empresa fictícia\\",\n \\"expiresin\\" 86400\n}\n", "customlabel" "" }, { "id" "gun048ld0fggrl 7yjzce", "language" "401", "code" "{\n \\"success\\" false,\n \\"message\\" \\"invalid credentials \\"\n}", "customlabel" "" } ], "selectedlanguageid" "8awq k4b2jwsr3cwel30t" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "clientid", "kind" "required", "type" "string", "description" "b2b client identifier provided by cambyopro for authentication", "" "b2b client identifier provided by cambyopro for authentication" }, { "name" "clientsecret", "kind" "required", "type" "string", "description" "credential associated with the clientid, provided by cambyopro ", "" "credential associated with the clientid, provided by cambyopro " } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" true, "autogeneratedanchorslug" "apino authauthenticationv1login", "legacyhash" "3d7xtj77rstde ut9f2t1" } all requests (except login) require bearer token authentication