// This module is included in the following assemblies:
// as_connecting-to-applications.adoc

[id='general-procedure-for-obtaining-authorization_{context}']
= General procedure for obtaining authorization

In an integration, you might want to connect to an application that uses
the OAuth protocol to authenticate access requests. To do this,
you must register your installation of {prodname} for access to that application.
Registration authorizes all connections from your {prodname} installation
to a given application. For example, if you register your {prodname}
installation with Salesforce, all connections from your {prodname}
installation to Salesforce use the same Salesforce client ID and the same 
Salesforce client secret that registration provided.

In each {prodname} environment, for each application that uses OAuth,
only one registration of {prodname} as a client is required. This 
registration lets you create multiple connections and each connection can
use different user credentials. 

While the specific steps vary for each OAuth application that you want to connect to,
registration always provides your {prodname} environment with a client ID and
a client secret. Some applications use other labels for the client ID
and client secret. For example, Salesforce generates a consumer key and
a consumer secret.

For some OAuth applications, {prodname} provides an entry in its *Settings*
page for adding the client ID and client secret that registration provides. To see which
applications this applies to, in the left panel of {prodname}, click
*Settings*. 

.Prerequisites

* In the {prodname} *Settings* page, there is an entry for the application
that uses the OAuth protocol to authorize access. 

.Procedure overview

. In the {prodname} *OAuth Application Management* page, expand the entry for the
application with which you want to register {prodname}. 
This displays the client ID and client secret fields.
. Near the top of the *OAuth Application Management* page, where you see
`*During registration, enter this callback URL:*`, copy that URL to the
clipboard.
. In another browser tab, go to the web site for the application that you
want to register with and perform the steps that are required to obtain
a client ID and secret. One of these steps requires you to enter
the callback URL for your {prodname} environment. Paste the
URL that you copied to the clipboard in the second step. 
. In {prodname}, on the *Settings* page, paste the
client ID and client secret and save the settings.

.Additional resources

* Examples of registering applications that have entries in the *Settings* page:

** link:{LinkSyndesisConnectorGuide}#register-with-salesforce_salesforce[Registering {prodname} as a Salesforce client]
** link:{LinkSyndesisConnectorGuide}#register-with-twitter_twitter[Registering {prodname} as a Twitter client]

* Example of registering with an application that does not have 
an entry in the {prodname} *Settings* page: 
link:{LinkSyndesisConnectorGuide}#register-with-dropbox_dropbox[Registering {prodname} as a Dropbox client]

* Information about using custom connectors that let 
you access applications that use the
OAuth protocol: 
link:{LinkSyndesisIntegrationGuide}#creating-connections-from-custom-connectors_connections[About creating a connection from a custom connector]. 
