Appery.io and Auth0 Join Forces To Simplify Mobile App Development With Identity Management

apperyio_plus_auth0

Building mobile apps with identity management wasn’t simple, until now. Auth0, a cloud service that eliminates the friction of identity for your app, and Appery.io, the only cloud platform with visual development tools and integrated backend services, are collaborating to make this happen. With the jointly created Appery.io Auth0 plugin, you can simplify identity management integration for your app, and this post will show you how.

Appery.io Platform

Appery.io is the only cloud-based platform with visual development tools and integrated backend services. Appery.io provides a powerful visual environment to build HTML5 and hybrid mobile apps connected to any API.

The Appery.io platform provides the following core features:

  • Build HTML5 mobile apps and hybrid apps for iOS, Android, and Windows Phone.
  • Drag and drop visual app builder for quickly building the app UI, with Source view for customizing the UI with any code.
  • Connect to any cloud API service, and bind the service to the page via a visual binding editor.
  • Integrated backend services that include: cloud database, push notifications, and server code.
  • HTML5 app hosting.
  • Fast testing in-browser, and on device via Appery.io Mobile Tester app.
  • Collection of plugins that provide fast integration with popular API providers.

Read the rest of this entry »

Building Mobile Apps with Tropo API in Appery.io

Working with mapping has been improved to provide you with a more efficient and user-friendly way of binding your data. Now, with the upgraded Mapping feature binding your data is more intuitive; it also provides more features and flexibility. This tutorial uses old mapping, and will be updated shortly. The new mapping uses the same concepts. The following page shows how to migrate the old mapping to the new mapping.

Tropo provides a powerful cloud API that can be used to add real-time communication features to your app. Using  popular web technologies such as PHP, JavaScript, Ruby and many others, it makes it easier to create and control network features.

tropo_log

Tropo also provides a great REST API that lets you configure and control Tropo applications through the use of RESTful methods. This includes the ability to create new Tropo apps, add phone numbers to them, delete applications, and much more. And as Appery.io provides a very comfortable way to work with REST API’s, it’s unbelievably easy to add Tropo communication features to your Appery.io app.

But before you begin, the Tropo application should be created by using the Scripting or Web API. Lets start with creating a simple Tropo app!

Sign up on the Tropo website, and create a new app:

tropo_new_app

Type a Tropo application name, and choose Scripting API:

tropo_basic_info

Now you should create script. Click “New script” to create it:

tropo_new_script

The text editor will appear. Lets add some simple code:

say('Hello from Appery.io!');
call(numberToDial);
say("Hello, " + customerName + "! There is a message for you: " + msg + "!");

Code explanation:

Function say will pronounce “Hello from Appery.io!” text by using the Tropo’s Text-To-Speech engine. After that, the phone number that was passed as a REST parameter will be dialed. Once the call is accepted, a second phrase will be pronounced. Note that the second phrase contains REST parameters too.

Enter the script name, and click “Save.” Don’t forget to specify the script file extension as “.js”:

tropo_new_script

Click “CREATE APP,” and you’re done with the Tropo side. You can test your Tropo app directly from the browser by using Phono. Click “Call App from browser” and then click the phone icon in the bottom left corner:

tropo_call_from_app

Note that you can’t test the call function directly from the browser.

Now you can launch your Tropo app via REST services from Appery.io.

Copy the voice API key to your clipboard:

tropo_api_key

In your Appery.io app, create the following UI:

tropo_ui

If you not familiar with Appery.io yet, we recommend looking at this very simple beginners tutorial.

All the application magic will be kept in a single REST service that will start the Tropo session. Create the REST service and specify the following settings:

tropo_rest_settings

As you can see, there is the Appery.io Proxy provided for this REST service. Click “New channel,” enter a new proxy name for this REST, and then click “Create” to create a new proxy channel directly from the Appery.io builder.

Note: Read about the Appery.io proxy via the link.

In the Request tab, you can specify parameters and their values that can be passed to the Tropo app. In our case, the Request parameters are the following:

tropo_request_parameters

Go to the Test tab and click “Test.” If everything was done correctly, you’ll see a “Test successful” message, and a REST service response that contains both token and id:

tropo_test

Note that you should obtain phone number to make calls, otherwise the script will fail. You also need to link the UI and REST service parameters.

Switch to Data tab, and create a new datasource based on this REST service. Click “Edit Mapping”:

tropo_rest_datasource

Create the following mapping for REST service Request:

tropo_rest_mapping

This will map data from the UI components to the REST parameters. If it’s difficult to understand, read about REST services and mapping.

Unlike the Request parameters, we will print the REST service response without mapping to print all its data. Open the Events tab, and create the following event:

start_tropo_session > Success > Run JavaScript. Add the following JavaScript code:

Apperyio('session_response').val(JSON.stringify(data));

Note that session_response in this case is the name of your Text Area component.

The last thing to do is to launch our REST service by clicking the button. Switch back to Design view, select the “Start session” button and add the following event:

start_session > Click > Invoke service > start_tropo_session.

Now you can test your app by clicking the “Test” button in the top right corner of the screen.

Click “Start session” and you’ll see the result:

tropo_test_app

If something above was not clear enough for you, check out the Appery.io tutorials and documentation.

Go ahead and create apps using Tropo documentation and the power of Appery.io!

Webinar: Learn How to Build Mobile Apps with Facebook API

Join the Appery.io webinar this Wednesday, at 11am (Pacific Time) learn how to build mobile apps with Facebook API.

Using Facebook API in Appery.io App

When building a mobile app in Appery.io, it’s very easy to use and connect to any APIs. Facebook provides one of the most popular and widely used APIs that you can as easily use in the app you build in Appery.io.

facebook-logo

Appery.io provides a really simple out-of-box approach to pass the OAuth protocol and connect with Facebook. Before building the Appery.io app you need to register as developer with Facebook and create an app. Once it’s done, go to Appery.io builder and import the Facebook API plug-in:

fb_import_plug_in

Once the plug-in is imported you need to specify Appery.io app ID and Facebook app ID in the Facebook_Setting file that listed under the Services folder:

fb_settings

One more thing to do is change the Start Page in App settings to Facebook_Login. After that you can test the app. You’ll see the Login to Facebook button, clicking on which will dial the OAuth log-in dialog, where you should enter your Facebook login and password. After successful authentication, information about you will be displayed at the Facebook_Me page:

fb_me_page

All of the Graph API features can be used the same way, but note, that some actions requires certain scope. You can change default scope parameter in the Facebook_Helper JavaScript file:
fb_tutorial_helper

That’s it, you can now invoke any available Facebook API.  Go ahead and see how to post a wall message in our detailed Facebook tutorial.

Connect With API Providers in Appery.io App Using OAuth.io

OAuth is an open protocol to allow secure authorization from web, mobile, and desktop apps. However, making  OAuth work in your mobile app is not a simple task and often takes a lot of time and effort. Using the OAuth.io service is a great and simple way to save time, and make the authentication pretty much work out-of-the-box.

oauth-io-logo

OAuth.io service can be easily integrated in Appery.io app. There are two ways to setup the OAuth.io plug-in in Appery.io app:

Include OAuth.js as JavaScript asset

This approach can be helpful when developing a mobile web app. Apps with OAuth.js included as JavaScript asset work from browser and can be quickly tested by clicking the Test button. Such approach saves development time because you don’t need to install the app on the device every time after making changes. These are the steps:

  1. Go to OAuth.io web site and download the latest JavaScript library.
  2. Upload this library to your Appery.io app by choosing Create New -> JavaScript -> Create from file.
  3. You have to remove or comment the if statement on line 193 in that file because the Appery.io app already contains some methods with “OAuth” name.

Include as PhoneGap plugin

Apps with OAuth.io service included as PhoneGap plugin will not work from the browser. Such apps should be built as binary and installed directly on the device. Steps for adding OAuth.io as PhoneGap plugin are almost identical to adding any 3rd party PhoneGap plug-in:

  1. Download repository from github plug-in page.
  2. Create new folder for this plugin in the Appery.io app and upload oauth.js:
  3. Add the following line of code to the very beginning of this file:
    • cordova.define(“com.phonegap.plugins.oauthio”, function (require, exports, module) {
      and the closing bracket to end of file “}”.
    • Edit the cordova_plugins.js file by adding plug-in description.

Once the OAuth.io included in Appery.io app the same code can be used to initialize and authenticate. See the OAuth.io documentation for code examples.

Examples

Adding Oauth.io service to your app is pretty simple.  See our detailed tutorial where we describe how to authenticate with Google and how to post to Facebook.

Appery.io + Salesforce: The Tools to Build Enterprise Mobile Apps Fast

We just made it incredibly easy and fast to build enterprise mobile apps connected to Salesforce API with the Salesforce Mobile Pack for Appery.io. Appery.io has two plug-ins that make it super easy to connect to Salesforce:

  • Salesforce OAuth API – this plug-is includes everything you need to connect to the Salesforce API via OAuth 2. Examples include Salesforce API, SOQL, and Chatter API
  • Salesforce Contacts API Sample App – this plug-in includes the OAuth 2 implementation plus a Contacts sample app. The mobile web app allows you to view, edit and create new contacts on Salesforce using the REST API.

A step by step tutorial shows how to import and use the plug-ins.

Screen Shot 2013-07-31 at 1.31.42 PM

Adding Salesforce plug-in

The Salesforce Contacts API Sample App has a complete app that allows to view and edit contacts in your Salesforce account. Use this app to learn how to use Salesforce API or as a starting for your app.

The Salesforce OAuth API has everything you need to get started. It includes a number of examples to get you started: using Salesforce API, using SOQL, and use Chatter API.

The Appery.io drag and drop visual app builder makes it incredibly easy to build or modify the app UI. You simply drag and drop components into the phone area. For example, editing the edit contact page from Contacts app:

Screen Shot 2013-07-31 at 1.36.56 PM

Visual drag and drop editor

You are not limited to what the plug-in provides. You can build any app UI using the visual editor and connect to any Salesforce APIs. Here is an example defining a service that connects to Salesforce:

Screen Shot 2013-07-31 at 1.48.53 PM

Salesforce API

Our guide shows in detail how to setup any Salesforce API service.

By combining the power of Salesforce and Appery.io dev. tools – we just made it super easy to build enterprise mobile apps entirely in the cloud. Visit https://appery.io/saleforce for a special promo code for Salesforce developers.

 

Originally posted on Maxa blog. 

New AT&T OAuth API Plug-in To Make it Easy to Build Apps with AT&T API

To make it easy to build apps with AT&T API, we just added the AT&T OAuth API Plug-in. The plug-in sets up the OAuth 2 authentication by returning an access token which then can be used to invoke any other AT&T API.

To import the plug-in, select Create New > From Plug-in > ATT OAuth API:

Selection_926

Once the plug-in is imported, open ATT_Settings file:

Selection_927

and set the client_it, client_secret, and scope. The client_id, and client_secret will be available once you register an app at http://developer.att.com. The scope value depends on the API you are going to use. For example, if you the Location API, it will be TL. Refer to docs for the correct scope for each API.

Here is an example of a registered app with three scopes (in red):

Selection_928

One more thing that needs to be set is the OAuth 2 redirect (or callback URL) in app settings

Selection_929

For the callback URL to work correctly, also do the following in the Test window (upper right):

  1. Uncheck Open in mobile frame
  2. Make the app pulbic

When running the app and you are not signed in into AT&T, you will see this page:

Selection_931

when signed in, you will see the access token:

Selection_930

The access token is also stored into local storage so you can use it to invoke other AT&T APIs.

Send Mesages with New AT&T In App Messaging API Plug-in

Get Access to the Entire Best Buy product catalog with New Appery.io Plug-in and Sample App

Best Buy Products API and Sample App plug-in provides a simple, REST-based interface for entire product catalog – past and present. This includes pricing, availability, specifications, descriptions, and images for over a million current and historical products.

Adding the plug-in to your app

To add the Best Buy Products API and Sample App plug-in, from Appery.io builder, select Create New > From Plug-in. Open Shopping, then select Best Buy Products API and Sample App:

bb006

Click Import selected plug-ins. The plug-in will be imported and you will see all its files in the Project view:

bb001

Before you run the app, we need to enter the Best Buy API key. Open Services/BestBuy_Settings file and enter your API key:

Selection_873

If you don’t have an API key, get it from Best Buy.

You should also go to Project/App settings, set the Start Page to BestBuy_Category_List, set the theme to BestBuy_Theme and check the Render all pages in one HTML file checkbox.

bb012

Running the sample app

You can now launch the app by clicking the Test button (in the upper right corner).

The starting page of app contains the list of categories as shown below:

bb013

Click any category button. The list of the products from the category opens on the Products page:

bb014

Click any product to get the product details. The page renders the image preview to the item and the available attributes as shown below:

bb015

You can also perform a search by entering a query in the text input at the top and pressing the search button.

REST API services used in the plug-in

Now that we’ve seen how this sample app works, let’s dig deeper to see how the Best Buy Products API is exposed in Appery.io platform.

The following REST services are used for getting information from Best Buy Products API:

BestBuy_GetProductsService service is used for getting the list of required products. REST service Settings display the URL, and other settings:

Selection_880

The {searchQuery} will be set when the app is running, based on user input.

Request tab shows the request parameters defined in the service:

Selection_881

Response parameters are automatically created after doing a service test (in Test tab):

Selection_882

 

Response parameter:

Selection_883

All other services are set in the same way.

Once a service is added to the page, it is then mapped to the page (request and response):

Selection_884

 

Search, Review, and Compare Prices with Aetna GoodRx API and Sample App Appery.io Plug-in

This post is is in the process of being updated for a more current version of the Aetna API.

How the plug-in works

Aetna GoodRx API and Sample App plug-in can be instantly added to any new or existing app. Aetna GoodRx is offering RESTful services that help to find the lowest retail cash price as offered by a national chain pharmacy for a given pharmaceutical. In addition, user will receive a URL for each result that will navigate to the page in the GoodRx mobile web experience that will display the pharmacy that is offering that price, and even find the closest branch to on their current location.

The ready-to-run app makes it super easy to start using the API. To add Aetna GoodRx plug-in:

  1. From Appery.io builder, select Create New -> From Plug-in
  2. Open Healthcare, then select Aetna GoodRx API and Sample App

grx001

After importing the plugin, set the default page to GoodRx_SearchPage, set the theme to GoodRx_Theme and check the Render all pages in one HTML file checkbox.

Using GoodRx API requires an API key which you can get from http://developer.carepass.com. To enter the API key, open Services/Aetna_GoodRx_Settings file:

Selection_836

Once the API key is set, click the Test button (upper right corner) to launch the app in the browser. The start page looks like this:

grx002

The page contains the search attributes for drugs as follows:

  • Drug Name (open text field, required if National Drug Code Directory identifier field is empty)
    • For example: lipitor
  • Drug form (drop-down, optional).
    • Possible values:
      • Tablet
      • Capsule
      • Injectable
      • Liquid
  • Dosage in mg (optional, requires digits)
    • For example: 10
  • Quantity (optional, requires digits)
    • For example: 30
  • Manufacturer Type (drop-down, optional)
    • Possible values:
      • Brand
      • Generic
  • National Drug Code Directory identifier (open text field, required if Drug Name is empty)

To test the app, you should enter some search parameters. For example, let’s enter “lipitor” in the “Drug Name” field. If you click the Search button then, you’ll see the screen with the search results:

grx003

If you click the Go to website button, you will be redirected to GoodRx desktop website or mobile website (if you launch the app on a mobile device).

grx004

The page shows information about the drug as well as information where it can be purchased.

Inside the plug-in

Now that we’ve seen how this sample app works, let’s dig deeper to see how the GoodRx API is exposed on the Appery.io platform.

GoodRx_LowPriceSearch service

GoodRx_LowPriceSearch is used for getting the list of the lower prices of the requested drugs. The URL and the main settings of the service as shown below:

grx005

If you open the Request tab, you’ll see that only the apikey parameter is defined here. The reason for this is that the service can receive different sets of parameters, so all the other required parameters are added dynamically in Javascript Helper.search() function before service invocation.

grx006

The response parameters are displayed under the Response tab:

grx007

GoodRx_Settings service

This service holds the API key. It is used in GoodRx_LowPriceSearch service.

grx008