website logo
⌘K
Quickstart
User
Metrics
Webhooks
iOS SDK
Swift
Flutter
React Native
Errors
Docs powered by archbee 

Quickstart

To get started with the Spike API first create an account, by signing up at https://spikeapi.com. Once approved you'll have access to the Spike developer console.

Once you have these credentials you can begin using Spike API.

Integration initialization

To initiate the integration flow and allow a user to connect data providers, applications must redirect the user to Spike's integration page.

https://api.spikeapi.com/init-user-integration/

Required parameters:

client_id (string) App ID for your team.

provider (string) name of the data provider.

user_id (string) A unique ID representing the end user. Typically this will be a user ID number from your application. Personally identifiable information should not be used in the user_id.



Providers

Provider

Short name

Apple Health*

apple

Dexcom

dexcom

Dexcom Sandbox

dexcom_sandbox

Fitbit

fitbit

Garmin

garmin

Google Fit

google_fit

Oura

oura

Polar

polar

Spotify

spotify

Strava

strava

Withings

withings

Whoop

whoop

*Please, use iOS SDK (Swift or Flutter) to connect to Apple Health.

GET Method Example

https://api.spikeapi.com/init-user-integration/?provider=fitbit&user_id=00001c&client_id=ea9e03f5-333-1111-2222-47a88c184c3b

POST Method Example

The form below is the client-side component your users will interact with to connect their accounts to Spike and allow you to access their accounts via the Spike API.

HTML Example
|


Integration Flow





Users will be redirected to a data provider website and users will be asked to submit authentication details. Once the user authorizes access to their data, Spike returns the user back to the application using the postback URL. (You can edit it on the developer console). Appended to the postback URL is the Spike user ID. Following is an example of the postback URL with the user ID highlighted:

https://my_test_app.com/callback?provider=fitbit&user_id=fa1e3803-6068-4ea7-9788-eccce210d30c

Please save it and use it for all user data requests.



Get data from devices

user_id (string) Key returned by Spike connect device request. This key should be stored in your database against the user and used for all interactions with the Spike API.

start_data (date) Date from in YYYY-MM-DD format

end_data (date) Date to in YYYY-MM-DD format

x-spike-auth (string) Application token from Spike console.

authorizationtoken (string) Application token from Spike console. (deprecated)

Python
|




Did this page help you?
Yes
No
UP NEXT
Add User Integration
Docs powered by archbee 
TABLE OF CONTENTS
Integration initialization
Required parameters:
Providers
GET Method Example
POST Method Example
Integration Flow
Get data from devices