Skip to content

POST user fitbit auth revoke

JeffMedeiros edited this page Nov 29, 2019 · 1 revision

Description

Revokes the user-associated Fitbit access token.

Permissions:

  • Application User can revoke Fitibit authorization from any Child.

  • Child user can revoke only Fitbit authorization of himself.

  • Educator and HealthProfessional users can revoke Fitbit authorization data from any Child as long as Child is part of any of their groups.

  • Family Member can revoke Fitbit authorization data only from child that associated with it

Scope

external:sync

URL

POST https://localhost/v1/users/{user_id}/fitbit/auth/revoke

Parameters

user_id: string (A 24-byte hex ID)

Curl example

curl -X POST "https://localhost/v1/users/5c86d00c2239a48ea20a0134/fitbit/auth/revoke" -H "accept: /" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response body

  • 204 Operation performed successfully. There is no data to be returned.

  • 400 Validation errors

    • Invalid user id

    • User does not exist

    • Access token expired

      • Pattern
        {
          "code": 400,
          "message": "Access token expired.",
          "description": "The access token ${accessToken} has been expired and needs to be refreshed."
        }
    • Access token invalid

      • Pattern
        {
          "code": 400,
          "message": "Access token invalid.",
          "description": "The access token ${accessToken} is invalid. Please make a new Fitbit Auth Data request and try again."
        }
    • Refresh token invalid

      • Pattern
        {
          "code": 400,
          "message": "Refresh token invalid.",
          "description": "The refresh token ${refreshToken} is invalid. Please make a new Fitbit Auth Data request and try again."
        }
    • Data request limit for access token expired

      • Pattern
        {
          "code": 400,
          "message": "Data request limit for access token ${accessToken} has expired.",
          "description": "Please wait a minimum of one hour and try make the operation again."
        }
    • Invalid Fitbit Client data

      • Pattern
        {
          "code": 400,
          "message": "Invalid Fitbit Client data.",
          "description": "The Fitbit Client credentials are invalid. The operation cannot be performed."
        }
    • Internal error

      • Pattern
        {
          "code": 400,
          "message": "A internal error occurs. Please, try again later."
        }
    • Internal error (unmapped)

      • Pattern
        {
          "code": 400,
          "message": "{ERROR_MESSAGE}"
        }
  • 401 Unauthorized Error

  • 403 Permission Error

  • 429 Too Many Requests Error

  • 500 Internal Server Error

  • 503 Fitbit service unavailable

    • Pattern
    {
      "code": 503,
      "message": "Could not connect with the Fitbit Server",
      "description": "Please try again later."
    }
    • Pattern 2
    {
      "code": 503,
      "message": "{ERROR_MESSAGE}"
    }

OCARIoT users

Integration endpoints

auth

users

institutions

children

children.physicalactivities

children.logs

children.sleep

children.weights

children.bodyfats

educators

educators.children.groups

families

families.children

healthprofessionals

healthprofessionals.children.groups

applications

institutions.environments

fitbit

fitbit.subscriber

users.fitbit.auth

users.fitbit.sync

Error patterns

400 Validation Errors

Clone this wiki locally