This site shows example request between your project backend and Move SDK API.
Create a new user
Use your Move SDK Project Id and your API Key as Basic Auth to register a new User. The userId may be any arbitrary string, only : is forbidden. The maximum length of userId is 100 characters.
Request:
POST https://sdk.dolph.in/v20/usercontent-type:application/jsonAuthorization:Basic {PROJECT_ID}:{API_KEY}{"userId":"string"}
Response:
{"accessToken":"{ACCESS_TOKEN}",// allows communication with MOVE SDK back-end"refreshToken":"{REFRESH_TOKEN}",// allows Move App to renew access token"userId":"{USER_ID}","audience":"{NAME_OF_API_KEY}","projectId": {PROJECT_ID}}
Initialize your Move SDK App with these tokens.
Create a new user (authCode)
Use your Move SDK Project Id and your API Key as Basic Auth to register a new User. The userId may be any arbitrary string, only : is forbidden. The maximum length of userId is 100 characters.
Request:
POST https://sdk.dolph.in/v20/user/authcodecontent-type:application/jsonAuthorization:Basic {PROJECT_ID}:{API_KEY}{"userId":"string"}
Response:
{"authCode":"{AUTHENTICATION_CODE}"}
Fetch user timeline
Fetch user timeline easily with:
Request:
GET https://sdk.dolph.in/v20/timeline?userId={USER_ID}&projectId={PROJECT_ID}content-type:application/jsonAuthorization:Basic {PROJECT_ID}:{API_KEY}
Convert the startTs of a given timeline item to a UNIX timestamp to fetch a specific timeline item. For example,
in the user timeline you find a timeline item with startTs in UTC time
"startTs":"2022-04-12T16:25:00Z"
Conversion into unix timestamp (UTC) is "1649780700" - this is your START_TS for fetching the specific timeline item.
Please note, if you want to display the trip in human readable form, you may want to translate the startTs to the local timezone (which you can find in "startLocation / timeZone"; e.g. "Europe/Vienna").
Request:
GET https://sdk.dolph.in/v20/timeline/{START_TS}?userId={USER_ID}&projectId={PROJECT_ID}content-type:application/jsonAuthorization:Basic {PROJECT_ID}:{API_KEY}
Some timeline item types like CAR and CYCLING return way points.
Request:
GET https://sdk.dolph.in/v20/timeline/{START_TS}/points?userId={USER_ID}&projectId={PROJECT_ID}&withWayPointInfo=truecontent-type:application/jsonAuthorization:Basic {PROJECT_ID}:{API_KEY}
Every user has 4 last locations, in different contexts:
car-end: last position of his car
timeline-end: end location of last timeline item
trip-position: updates live during a trip
user-pos: updates user walking position
GET https://sdk-test.dolph.in/v20/location?projectId={PROJECT_ID}&userId={USER_ID}Content-Type:application/json; charset=UTF-8Authorization:Basic {PROJECT_ID}:{API_KEY}