AT&T recently launched new In App Messaging API. The API makes it very easy to send SMS message from your mobile app, using your own number. Another great feature is that now you can send a message to any mobile number, regardless of carrier.
To make it as easy as possible to use this API, we added a plug-in to Tiggzi Platform. The plug-in has all the API pre-configured and comes with a sample app. If you don’t have one yet, sign up for ATT Developer account.
- Go to http://developer.att.com and sign up
- Register a new app. When you enter app details, check In App Messaging from Mobile Number (Beta).
- Once the app is created, you will see this:
You will need to use the App Key and Secret values when we import the plug-in.
We’ll come back to this page a little bit later to set the callback URL.
Let’s go to Tiggzi Platform.
- Create a new app in Tiggzi.
- From Project view, Create New > From Plug-in:
- Next, under Communication category, select ATT In App Messaging API and Sample App (you can also search for it).
- Click Import selected plug-ins button
- When the plug-in is imported you will see a new page as well as three services under Services folder. You can open the page ATT_Messaging page to see how the UI looks:
The Sign In to AT&T button will only appear if you need to sign in into AT&T to authenticate. The area to send the message won’t be displayed. If you are authenticated, then only the section to send the message will be displayed.
- Delete startScreen page (created with the new project)
- Open ATT_Settings service and paste in the App Key and Secret values from the app configuration page:
- Just a few more steps before you can test the app. Open Test in the upper right corner and check Public and uncheck Show in mobile frame:
- Copy the URL shown, then go back to app settings on AT&T developer site and enter the OAuth Redirect URL (you might need to click to edit the app):
- That’s everything and test the app in desktop browser.
When you test the app in a desktop browser, to authenticate you will need to enter your mobile number to get a 4-digit code. When you test on the mobile device, you won’t need to do this. To test on the mobile device, email the link to the device or simply scan the QR code in Test window.
When you receive the text and click Allow, you will need to enter the number received:
Once you enter the number, you will be redirected to the app:
Final note, this plug-in only works when running the app in the browser. As the API requires oAuth 2 authentication, it won’t in a PhoneGap (hybrid) app. We will update the plug-in to work in a PhoneGap app as well.