05-05-2015 05:13 - edited 05-05-2015 06:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 05:13 - edited 05-05-2015 06:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I'm a presales for software company in France. My intent is to use Fitbit notifications to demonstrate realtime streaming notifications.
I want to setup a notification system, I setuped an endpoint accessable from your servers.
I configured an application and a subcriber.
I want to perform a simple test to decided if we will use Fitbit as an information provider or should I use another connected watch.
I setuped the runscope and added some activities to my page. no notifications were sent 😞
Can you help me ?
regards,
Vitor

- Labels:
-
Subscriptions API
05-05-2015 11:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



05-05-2015 11:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Fitbit Subscriptions API will send notifications to your web server application for any user whose resources you subscribe to.
When a user authorizes your application, you must create a subscription for that user. Documentation at https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API#FitbitSubscriptionsAPI-Addasubscription

05-05-2015 11:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 11:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Jeremiah,
thanks for the reply.
added an app and an subscrition, I tested it with runscope, I updated some data in my profile.. but nothing in the runscope notification.

05-05-2015 11:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



05-05-2015 11:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Have you tried hitting your Runscope URL with a browser or curl to verify that it is setup correctly?

05-05-2015 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
yes with Curl

05-05-2015 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-05-2015 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
What's the response of this api endpoint: GET https://api.fitbit.com/1/user/-/apiSubscriptions.json ?
Senior Software Developer at Fitbit

05-05-2015 11:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 11:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
{"errors":[{"errorType":"oauth","fieldName":"n/a","message":"No Authorization header provided in the request. Each call to Fitbit API should be OAuth signed"}],"success":false}

05-05-2015 11:43 - edited 05-05-2015 11:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-05-2015 11:43 - edited 05-05-2015 11:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
🙂 you have to make proper API request.
the respond you pasted above means your application is not doing proper Fitbit API requests. In particular it says you don't provide Authorization header which is required to make any of Fitbit API requests.
Senior Software Developer at Fitbit

05-05-2015 11:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 11:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
ok,
But I don't want to make any request.
I just want to receive notifications. Honstly I quitte noob on the OAuth, I don't konw if I did things in the good way.
To resume what I did:
I have a simple rest POST service listening in a VM (Amazon)
I created an application
Create a temboo account and did the steeps to authentificate
I added a subcribe endpoint.

05-05-2015 11:51 - edited 05-05-2015 11:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-05-2015 11:51 - edited 05-05-2015 11:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You need to make valid fitbit api requests to create subscription - this is requirement. WIthout doing it you don't have any subscriptions, you only have subscriptions endpoint that never will be hit by fitbit unless you create subscription via Fitbit API.
here is example request you have to make to create subscription:
POST https://api.fitbit.com/1/user/-/apiSubscriptions/<subscriptionIdOfYourChoice>.json
Senior Software Developer at Fitbit

05-05-2015 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



05-05-2015 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You can also see a history of Subscriptions notifications Fitbit has attempted to send your app by clicking on the "details" link beside your subscription URL in your app settings at dev.fitbit.com

05-05-2015 12:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 12:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok,
no details on the subscription.
I read the wiki, but things are quite complicated to my technical knowlodge.
Do you have any tutorial steep buy steep how to set up notification works with JAVA service ?

05-05-2015 12:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-05-2015 12:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
All documentation is here: https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API
I wouldn't call it the easiest thing in the world.
It will require some time to understand how it works if you never did push notification before to actually start using it.
Senior Software Developer at Fitbit

05-05-2015 12:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2015 12:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Ivan,
normaly I did the OAuth with temboo. I don't have any more ideas. here.
Is there any kind of support (payable) that can help me on setting up the noitification system ?
