Add Applications

To access the API of a service provider, you must create an application with that service provider. Creating an application will provide you with a consumer key (also known as API key or application key) and a consumer secret (also known as API secret or application secret).

To create an application, log in to the developer community of the service provider, select Create New Application, or similar option, and fill out the required information. See Supported Service Providers for links to service providers documentation for developers. In this topic we take a look at how this is done at Twitter.

  1. First, log into https://developer.twitter.com/en/apps/ (creating a new account if necessary), and click Create an app in the top right corner.

    Twitter developers window

  2. Fill out the required information, such as the name and description of the application, and read through Twitter's terms of service before accepting.

    One of the fields in the form is a Callback URL. This is the URL that Twitter will redirect a browser to after the user has accepted to let your application interact with the Twitter account on the user's behalf. This field must be set to the path OAuthCallback under the folder in which the Management Console is deployed. For instance, if running with an embedded Management Console, it runs at http://localhost:50080/. In this case, the callback URL would be specified to http://localhost:50080/OAuthCallback. However, beware that some service providers do not allow a callback URL containing localhost. Twitter is one of those providers, so we will use http://127.0.0.1:50080/OAuthCallback instead.

    Alternatively (and this is required by some service providers), you must specify the hostname or non-loopback IP address of the machine on which you are running the Management Console. Since this page is loaded by the browser of the authenticating user, this need not be a public hostname or IP address.

    After creating the application, a summary of the application appears. You must copy some of these values into Management Console.

  3. Open Management Console in a browser. Use the same IP address or hostname that was entered as callback URL.

    In the example below, we point our browser to http://127.0.0.1:50080/.

  4. Navigate to Repository > OAuth and click New Application.
  5. Select a name for the application (this does not need to be the same name as what is used when you created the application at the service provider) and select the service provider (in this case Twitter).


    The consumer key and consumer secret must be copied from the summary page of the application presented by the service provider.

  6. Enter the same callback URL you entered in step 3 and click Save.

    Some service providers additionally require that you specify a scope; for example, what parts of the API that a user will authorize the application to access. For instance, when accessing Google, the scope https://www.google.com/analytics/feeds/ must be specified if the application should be allowed to access the Google Analytics Data API. Twitter does not use the scope field, so this will be left blank in this example.

    You have now set up an OAuth application in the Management Console.

    Note If you edit the application later, the consumer secret is displayed as "(encrypted)" for security reasons.