GET
/
v2
/
user
/
providers
/
{user_id}
curl --request GET \
     --url {{BASE_URL}}/v2/user/providers/{user_id} \
     --header 'Accept: application/json' \
     --header 'x-vital-api-key: API_KEY'
{
    "providers": [
        {
            "name": "Fitbit",
            "slug": "fitbit",
            "logo": "https://example.com/fitbit.png",
            "status": "connected",
            "resource_availability": {
                "body": {
                    "status": "available",
                    "scope_requirements": {
                        "user_granted": {
                            "required": [
                                "weight"
                            ],
                            "optional": []
                        },
                        "user_denied": {
                            "required": [],
                            "optional": []
                        }
                    }
                },
                "sleep": {
                    "status": "unavailable",
                    "scope_requirements": {
                        "user_granted": {
                            "required": [],
                            "optional": []
                        },
                        "user_denied": {
                            "required": [
                                "sleep"
                            ],
                            "optional": [
                                "heartrate",
                                "oxygen_saturation",
                                "respiratory_rate"
                            ]
                        }
                    }
                }
            }
        }
    ]
}

Response object schema

providers
object[]
required
name
string
required
slug
string
required
logo
string
required
status
string
required

Possible value: connected, paused or error.

resource_availability
object
required
{resource_slug}
object
required

{resource_type} is the same resource slug used across all APIs and data events. e.g. activity, workouts, sleep, etc.

status
string
required

Possible value: available or unavailable.

A resource is available only when the user has granted all required scopes.

scope_requirements
object | null
required

Scope requirements of this provider resource. If the provider has no concept of API access scopes, this is null.

user_granted
object
required

Scope(s) granted by the user.

required
string[]
required

Scope(s) that must be granted for this resource to be minimally functional.

optional
string[]
required

Scope(s) that would enrich this resource with more information, but are not required for the resource to be functional.

user_denied
object
required

Scope(s) denied by the user.

required
string[]
required

Scope(s) that must be granted for this resource to be minimally functional.

optional
string[]
required

Scope(s) that would enrich this resource with more information, but are not required for the resource to be functional.

Authorizations

x-vital-api-key
string
headerrequired

Vital Team API Key

Path Parameters

user_id
string
required

Response

200 - application/json

The response is of type object.