API reference
Initiate integration url
{ "name" "initiate integration", "method" "get", "url" "https //app api spikeapi com/v3/providers/{provider slug}/integration/init url", "description" "initiate new provider integration by fetching an url to redirect application user to after going through the provider specific flow (granting permissions) application users will be redirected back to your preconfigured callback url alternatelly redirect uri param can be used to override the default value \n\nnotice that providers health connect and apple use different permission handling schemas, therefore do not go though oauth flow this end point is not to be used and application users will not be redirected to callback url for more details on mobile providers integration creation refer to sdks section ", "tab" "examples", "examples" { "languages" \[ { "id" "co nququth xyjnpwxess", "language" "curl", "code" "curl request get \\\\\n url https //app api spikeapi com/v3/providers/fitbit/integration/init url \\\\\n header 'accept application/json, application/problem+json' \\\\\n header 'authorization bearer eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9 eyjpc3mioii5otk5osisinn1yii6ime5zju3odazmgixythkywuifq djhtpuc7gakk03rtfqxufjzrbnpfwjgvjnfu7yuy4a4'", "customlabel" "" }, { "id" "vgkdiwiqu7vomgfaeyytv", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //app api spikeapi com/v3/providers/{provider slug}/integration/init url/{provider slug}?mock provider uri=string\&redirect uri=string\&state=string',\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" "r7xeaunrpkzosvplcdjzn", "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 //app api spikeapi com/v3/providers/{provider slug}/integration/init url/{provider slug}?mock provider uri=string\&redirect uri=string\&state=string\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" " dbjjwuhgqi2gt8r0yey8", "language" "python", "code" "import requests\n\nurl = \\"https //app api spikeapi com/v3/providers/{provider slug}/integration/init url/{provider slug}?mock provider uri=string\&redirect uri=string\&state=string\\"\n\npayload = {}\nheaders = {\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "k3qijxjykhdygun5sljr0", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //app api spikeapi com/v3/providers/{provider slug}/integration/init url/{provider slug}?mock provider uri=string\&redirect uri=string\&state=string\\")\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" "co nququth xyjnpwxess" }, "results" { "languages" \[ { "id" "qfu6epz 8pp15gg8ebsdx", "language" "200", "code" "{\n \\"path\\" \\"https // /fitbit\\",\n \\"provider slug\\" \\"fitbit\\"\n}", "customlabel" "" } ], "selectedlanguageid" "qfu6epz 8pp15gg8ebsdx" }, "request" { "pathparameters" \[ { "name" "provider slug", "kind" "required", "type" "string", "description" "strava, fitbit, garmin, huawei, whoop, withings, oura, polar", "" "strava, fitbit, garmin, huawei, whoop, withings, oura, polar" } ], "queryparameters" \[ { "name" "redirect uri", "kind" "optional", "type" "string", "description" "redirect uri", "" "redirect uri" }, { "name" "state", "kind" "optional", "type" "string", "description" "state", "" "state" } ], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "provide your bearer token in the authorization header when making requests to protected resources \n", "" "authorization" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" }, "hastryitout" false, "response" \[ { "name" "path", "kind" "optional", "type" "string", "description" "path url (mandatory)" }, { "name" "provider slug", "kind" "optional", "type" "string", "description" "provider slug (mandatory)", "children" \[] } ] }