Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Subscription Notifications demo

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

 

 

 

 

Best Answer
0 Votes
13 REPLIES 13

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

Best Answer
0 Votes

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.

Best Answer
0 Votes

Have you tried hitting your Runscope URL with a browser or curl to verify that it is setup correctly?

Best Answer
0 Votes

yes with Curl 

Best Answer
0 Votes

What's the response of this api endpoint: GET https://api.fitbit.com/1/user/-/apiSubscriptions.json ?

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes
{"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}
Best Answer
0 Votes

🙂 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.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

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.

 

 

 

Best Answer
0 Votes

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

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

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

Best Answer
0 Votes

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 ?

 

 

Best Answer
0 Votes

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.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

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 ? 

 

 

Best Answer