Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

authenticated usersPOST /v3/oauth/:vendorIdentifiervendorId
body{"authCode":"<authCode>"}
if auth code provided in postget access and refresh tokens
no authCode provided, accessToken exists, not expiredreturn access token
no authCode provided, accessToken exists, expiredrefresh access token, return new access token
401no authCode, no accessToken, or an error
200{"accessToken":"<accessToken>","expiresOn":"<ISO 8601 timestamp>"}

...

workersGET /v3/studies/:studyIdentifier/oauth/:vendorIdentifiervendorId?pageSize=x&offsetKey=y
200{"items":["healthCode1","healthCode2"], "requestParams": {...}, "type":"ForwardOnlyCursorPagedList"}

...

workersGET /v3/studies/:studyIdentifier/oath/:vendorIdentifiervendorId/grants/:healthCode
if access token exists and is not expiredreturn access token
if access token exists and is expiredrefresh token and return refreshed token
401anything else (should only be an error from Fitbit)
200{"vendorId":"vendorId","accessToken":"<accessToken>","expiresOn":"<ISO 8601 timestamp>"}

...