Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

How do I find the apps a user is connected to?

Validic's apps.json endpoint returns all the apps available for a user to connect to. To only return the apps a user is currently connected to, simply append the "synced" parameter to the apps.json request you are familiar with. This will only return apps with "synced":true. See the example below.

If only the name of the app is required rather than all the details provided in apps.json, you may want to utilize Validic's profile.json call.

How do I know when a user first connected to a specific app?

Validic's apps.json endpoint will only return the timestamp of when the user first connected to an app if the "synced" parameter is appended when requesting apps.json. The timestamp in the "first_sync" represents the time the user initially connected to an app, not necessarily the last time they connected to the app.

Since this will only return apps the user is currently connected, it will not be possible to determine when a user first connected to an app if they are currently disconnected.

Synced Apps Request Example

https://api.validic.com/v1/organizations/{ORGANIZATION_ID}/apps.json?access_token={ACCESS_TOKEN}&authentication_token={USER_TOKEN}&synced=1

Each app in the response will contain a field labeled "first_sync".

Synced Apps Response Example

NOTE: If you are using the Validic Ruby wrapper, note that the old field name has changed from ":last_synced" to "last_sync".

{
    "summary":{
        . . .
    },
    "apps":[
        {
            "download_link":"https://buy.garmin.com/shop/shop.do?pID=104231"",
            "excerpt":"Garmin designs, manufactures and markets GPS navigation, communication and sonar products.",
            "extra_excerpt":"Garmin Connect presents your data in clear and easy to understand evaluation. Over the coming months we'll provide even more tools to help you optimize your training. See what's in store for you when you upload your workout data to Garmin Connect. From uploads, to analysis, to exploring millions of activities worldwide, there's something here for you at Garmin Connect.",
            "first_sync":"2015-06-25T19:50:14+00:00",
            "kind":[
                "Routine",
                "Fitness",
                "Sleep"
            ],
            "last_sync":"2016-07-02T08:56:31+00:00",
            "logo_url":"/assets/appicons/garmin-connect.png",
            "name":"Garmin Connect",
            "platform_types":[
                "Android",
                "iOS",
                "Web"
            ],
            "refresh_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/refresh/garmin_connect?format_redirect=json&user_token={USER_TOKEN}",
            "subname":"garmin_connect",
            "sync_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/authorize/garmin_connect?format_redirect=json&user_token={USER_TOKEN}",
            "synced":true,
            "unsync_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/unsync/garmin_connect?format_redirect=json&user_token={USER_TOKEN}",
            "validated_data_available":false,
            "validated_object_types":[
                
            ]
        },
        {
            "download_link":"https://jawbone.com/up/devices"",
            "excerpt":"UP is a wristband and app that tracks how you sleep, move and eat.",
            "extra_excerpt":"UP was designed to fit seamlessly in people's lives. Real life. It's a thoughtful combination of engineering and design, custom-made for how we live. UP is both flexible and strong. Sometimes UP needs to slide smoothly under sleeves or bend to accommodate an active lifestyle. Other times it has to be strong enough to stand up to a snowball fight without a problem (or more likely, a few thousand showers). Day and night, UP is right there with you.",
            "first_sync":"2015-05-11T14:15:05+00:00",
            "kind":[
                "Routine",
                "Fitness",
                "Nutrition",
                "Sleep",
                "Weight"
            ],
            "last_sync":"2016-07-05T19:13:33+00:00",
            "logo_url":"/assets/appicons/jawbone_up-icon.png",
            "name":"Jawbone UP",
            "platform_types":[
                "Android",
                "iOS",
                "Windows Phone"
            ],
            "refresh_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/refresh/jawbone_up?format_redirect=json&user_token={USER_TOKEN}",
            "subname":"jawbone_up",
            "sync_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/auth/jawbone_up?format_redirect=json&user_token={USER_TOKEN}",
            "synced":true,
            "unsync_url":"https://app.validic.com/organizations/{ORGANIZATION_ID}/unsync/jawbone_up?format_redirect=json&user_token={USER_TOKEN}",
            "validated_data_available":false,
            "validated_object_types":[
                
            ]
        }
    ]
}

  • No labels