3

I am trying to setup the Fitbit api from dev.fitbit.com The first part is to register an application and I am stuck in this part already:

enter image description here

For example: I have no clue what I have to fill in for the callback url. (I have never done that before using an api) Also the access type or the application type is for me very confusing.

the callback url:

enter image description here

I would really appreciate any help with setting up this api in xcode in the language Swift.

Thanks.

Kevin.

Swift Developer
  • 247
  • 2
  • 18
  • Hey @KevinVugts can you share your code/steps with me please ? because i am also stuck after registration and have no idea what to do next – Umair Afzal May 30 '16 at 06:41

2 Answers2

2

It may be helpful for you-

enter image description here

You can use callback url as https://www.google.com/ for testing purpose. If you are designing app for a particular Organisation than put that organisation url - Example- http://www.fortishealthcare.com

Swift Developer
  • 247
  • 2
  • 18
  • Thank you very much. So in case I don't need the callback url I just fill in the google.com ? –  May 19 '16 at 10:29
  • Why should I use client and not the personal oAuth application type? @Mohd Saleem –  May 19 '16 at 10:29
  • yes @Kevin you can use google.com for testing purpose – Swift Developer May 19 '16 at 10:44
  • 1
    And OAuth Application type is required to know for which purpose do you want to use , So you can select for your personal use as Personal – Swift Developer May 19 '16 at 10:47
  • 1
    Thank you for your quick response. Do you know how I can do a request. For example I want to read the amount of steps I took each day. How can I request this? What do I need to set up. –  May 19 '16 at 12:53
  • Its seem a little bit complex, so please first read documentation-https://dev.fitbit.com/docs/basics/ – Swift Developer May 19 '16 at 12:56
  • It may be helpful to you- https://community.fitbit.com/t5/Web-API/bd-p/dev – Swift Developer May 19 '16 at 12:58
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/112399/discussion-between-mohd-saleem-and-kevin-vugts). – Swift Developer May 19 '16 at 13:00
  • I have read this documentation already but It is not clear for me how to set this up for xcode in language swift... Especially the authorization to get the acces token. Because otherwise I am not able to do get requests. –  May 19 '16 at 17:56
  • One of the easiest way is that -> do it using podfile- by following link- https://github.com/OAuthSwift/OAuthSwift – Swift Developer May 20 '16 at 05:12
  • Hi, Have you implemented logout features? Mean how can we do logout Fitbit user and When click on login button ask for login again.. I know about revoke access token by https://api.fitbit.com/oauth2/revoke but by calling revoke token api not asking login again. – Govaadiyo Sep 20 '18 at 12:16
1

Callback URL is the URL scheme which is used to redirect the user back to the application from the browser after getting logged in.

Callback URL can be any string or name of the app in the following format "demoapp://something"

enter image description here

In project target Info, put the name of the app or the prefix of "://" from Callback URL in URL scheme here

enter image description here

  • Hi, Have you implemented logout features? Mean how can we do logout Fitbit user and When click on login button ask for login again.. I know about revoke access token by https://api.fitbit.com/oauth2/revoke but by calling revoke token api not asking login again. – Govaadiyo Sep 20 '18 at 12:12