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.