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
ionic accountkit integration
Enable Accountkit
Enable Accountkit
ionic accountkit token generate
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));
Please login to download source code Login Here



Facing any issues? feel free to comment below.


Sundaravel M

About the author: Hi! I'm Sundaravel (codesundar), Founder of I have been a Web, Mobile App developer, Author, and Teacher since 2014. I also worked as a software consultant for fortune 500 companies. I created to share my real-time knowledge in various technologies such as PhoneGap, Ionic, Flutter and more.