Umair Afzal Umair Afzal - 19 days ago 11x
iOS Question

How to integrate FitBit Api in IOS app using Swift

First of all I created an account at
Then I careated an app at
then installed OAuthSwift using cocoa pods and implemented this method in my AppDelegate

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
if ( == "oauth-callback") {
return true

now i want to get the data (Name, Steps taken etc) of user account I created at
how can I do that ? I searched but was not able to find any tutorial on fitbit integration. And where to use this information in my code?
enter image description here
So please guide me about next step what should I do to get the data.


FitBit work with OAuth 2.0 API which require Client ID and Secret key. You need these client id and secret key to authenticate with OAuth 2.0 API. There is a blog post related to FitBit integration in iOS with Swift. Lets checkout and learn "How to implement fitbit in iOS"


let oauthswift = OAuth2Swift(
        consumerKey:    fitbit_clientID,
        consumerSecret: fitbit_consumer_secret,
        authorizeUrl:   "",
        accessTokenUrl: "",
        responseType:   "token"