This site shows example request between your project back-end and Move back-end.
1. Create a new user
Use your Move SDK Project Id and your API Key as Basic Auth to register a new User. User Id can be every string combination only : is forbidden. The max length of User Id is 100 characters.
Request:
POST https://sdk.dolph.in/v20/auth/registercontent-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":"{AUDIENCE_OF_API_KEY}","projectId": {PROJECT_ID}}
Initialize your Move SDK App with this tokens.
2. 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 startTs to epoch UNIX timestamp to fetch 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}
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}