iOS (Swift)
SDK Installation
Summary:
Connection setup/management
SDK Initialization
Initializing a Connection
Creates a token to be used with initConnection() functions in the Terra mobile SDKs in order to create a user record for Apple Health or Samsung Health (or equivalent)
Authorizations
x-api-keystringRequired
Your API key for authentication
dev-idstringRequired
Your developer ID for authentication and tracking
Responses
200
200
application/json
statusstringOptionalExample:
successtokenstringOptionalExample:
250c68b9c21b78e40e7a3285a2d538d3bc24aabd3b4c76a782fb0a571ca4501dexpires_inintegerOptionalDefault:
0Example: 180404
A referenced resource does not exist on Terra's end.
application/problem+json
post/auth/generateAuthToken
POST /api/v2/auth/generateAuthToken HTTP/1.1
Host: access.tryterra.co
x-api-key: YOUR_API_KEY
dev-id: YOUR_API_KEY
Accept: */*
{
"status": "success",
"token": "250c68b9c21b78e40e7a3285a2d538d3bc24aabd3b4c76a782fb0a571ca4501d",
"expires_in": 180
}Connecting a device
Streaming Real-Time Data
Start Streaming
Stop streaming and disconnect
WatchOS Integration
Setup
Start Streaming from WatchOS
Streaming Workouts from WatchOS
Last updated
Was this helpful?