API reference
Authenticate via HMAC
{ "name" "authenticate via hmac", "method" "post", "url" "https //app api spikeapi com/v3/auth/hmac", "description" "authentication using an hmac signature ", "tab" "examples", "examples" { "languages" \[ { "id" "azee pu3bzkjikyflyxfl", "language" "curl", "code" "curl location 'https //app api spikeapi com/v3/auth/hmac' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n\\"application id\\" 1234,\n\\"application user id\\" \\"my user id 123\\",\n\\"signature\\" \\"efbcf008407e4a63ad 10412ca72d74cf7b6e18\\"\n}'", "customlabel" "" }, { "id" "0ezp8jp5zmarnuqs18o9b", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //app api spikeapi com/v3/auth/hmac',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"application id\\" \\"number\\",\n \\"application user id\\" \\"string\\",\n \\"signature\\" \\"string\\",\n \\"uts\\" \\"number\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "b6omqnnk26pbx1mj4dkzi", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"application id\\" \\"number\\",\n \\"application user id\\" \\"string\\",\n \\"signature\\" \\"string\\",\n \\"uts\\" \\"number\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //app api spikeapi com/v3/auth/hmac\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ceyjhtl8tpqe7hpz xogx", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //app api spikeapi com/v3/auth/hmac\\"\n\npayload = json dumps({\n \\"application id\\" \\"number\\",\n \\"application user id\\" \\"string\\",\n \\"signature\\" \\"string\\",\n \\"uts\\" \\"number\\"\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" "aslelymnbqpif868aozzg", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //app api spikeapi com/v3/auth/hmac\\")\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 \\"application id\\" \\"number\\",\n \\"application user id\\" \\"string\\",\n \\"signature\\" \\"string\\",\n \\"uts\\" \\"number\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "azee pu3bzkjikyflyxfl" }, "results" { "languages" \[ { "id" "i bommkhaftahl2zn4lfb", "language" "200", "customlabel" "", "code" "{\n \\"access token\\" \\"eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9 eyjpc3mioiixmjm0iiwic3viijoibxlfdxnlcl9pzf8xmjmifq rlakpufohadwdhsffwlsbfpie xj2b5wdeyw94wytcs\\",\n \\"user info\\" {\n \\"application id\\" 1234,\n \\"application user id\\" \\"my user id 123\\",\n \\"uid\\" \\"0ac43deb 9e2a 522d 9a21 2935043ff13c\\",\n \\"compat application client token\\" \\"00000000 0000 0000 0000 000000000000\\",\n \\"compat application client id\\" \\"00000000 0000 0000 0000 000000000000\\",\n \\"integrated providers\\" null,\n \\"created at\\" null\n }\n}" } ], "selectedlanguageid" "i bommkhaftahl2zn4lfb" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "application id", "kind" "required", "type" "number", "description" "application id", "" "application id" }, { "name" "application user id", "kind" "required", "type" "string", "description" "application end user id", "" "application end user id" }, { "name" "signature", "kind" "required", "type" "string", "description" "hmac signature", "" "required" }, { "name" "uts", "kind" "optional", "type" "integer", "description" "unix timestamp\n", "" "unix timestamp\n" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "access token", "kind" "optional", "type" "string", "description" "access token\n" }, { "name" "user info", "kind" "optional", "type" "object", "description" "user info", "children" \[ { "name" "application id", "kind" "optional", "type" "integer", "description" "application id" }, { "name" "application user id", "kind" "optional", "type" "string", "description" "application user id\n" }, { "name" "created at", "kind" "optional", "type" "string", "description" "created at" }, { "name" "integrated providers", "kind" "optional", "type" "object", "description" "list of integrated providers\n", "children" \[ { "name" "created at", "kind" "optional", "type" "string", "description" "created at" }, { "name" "is integration broken", "kind" "optional", "type" "boolean", "description" "is integration broken" }, { "name" "provider integration id", "kind" "optional", "type" "integer", "description" "provider integration id\n" }, { "name" "provider slug", "kind" "optional", "type" "string", "description" "provider slug\n\n\n" } ] }, { "name" "uid", "kind" "optional", "type" "string", "description" "spike internal user id\n" } ] } ] }