Ionic AccountKit Integration


Ionic AccountKit Integration: This article, we're going to learn "How to authenticate user using SMS / Phone Number by Facebook AccountKit"


  • Facebook Developer Account
  • Ionic Setup

Create Client Token on Developer's Account

Login with


ionic accountkit integration

Enable Accountkit

ionic accountkit token generate

Working with Ionic Project

Create new project

ionic start accountkit blank

Adding Platform

ionic cordova platform add android
ionic cordova platform add ios

Adding Plugin (Replace with your details)

ionic cordova plugin add cordova-plugin-accountkit --save \
   --variable APP_ID="767XXXXXXX58358" \
   --variable APP_NAME="CodeSundxxxxx" \
   --variable CLIENT_TOKEN="6d97e93101b1681dfcb868xxxxxxx" \
   --variable API_VERSION="v1.1"

Adding Button on home.html

<div>PhoneNumber: {{userInfo.country_code}}{{userInfo.phoneNumber}}</div>
<button ion-button color="primary" (click)="register()">Register</button>

Working with home.ts

    useAccessToken: true,
    defaultCountryCode: "IN",
    facebookNotificationsEnabled: true,
  }, data => {
    info => this.userInfo = info,
    err => console.log(err));



Facing any issues? feel free to comment below.