You are here:
Oauth2 Authentication
Oauth2 is an authentication method commonly used as a way for users to authorize websites or applications to access their information on other vendors using authentication tokens, without giving them the credentials to the vendor. Oauth2 is used when the connection to a vendor is done through a mediator app.
When generating an authentication token, the mediator app contacts the relevant vendor and trigger it to send the user an authentication request. When the user enters their credentials, a token will be created and saved for future use. This token is the authentication method for connecting to the vendor from now on. You can see a use of oauth2 in Marketing Cloud Intelligence in some of our API connectors. For example, when creating a Google Analytics data stream the authentication screen is a Google authentication screen triggered by Marketing Cloud Intelligence. When the user enters their credentials, an authentication token is saved in Marketing Cloud Intelligence for future use.
Marketing Cloud Intelligence enables the use of Oauth2 authentication in HTTP retrieval settings, for example when retrieving data from vendors that require this kind of authentication like Hubspot. To apply an Oauth2 authentication choose Oauth2 as the Authentication Type in the retrieval settings of the Data Stream. Then enter the relevant details required by the vendor to generate an authentication token.
- Callback URL - Enter this URL in the mediator app you use, the callback URL is used by the mediator app to direct the response back to Marketing Cloud Intelligence.
- Token Name - This is an internal name that is used only in Marketing Cloud Intelligence.
- Auth URL - This is the URL of the vendor's authentication window, as provided by the vendor.
- Access Token URL - This is the URL of the token that becomes available after the authentication process is complete. It should be provided by the vendor.
- Client ID - A part of the mediator's app credentials when accessing the vendor, as provided by the mediator app you’re using.
- Client Secret - A part of the mediator's app credentials when accessing the vendor, as provided by the mediator app you’re using.
The following fields are optional. Some vendors might require you include them in the request. The vendor's requirements should be included in their documentation.
- App ID - A part of the mediator's app credentials, as provided by the mediator app, and is optional and not required for all Vendors.
- Request Token URL - Also referred to as 'Refresh Token URL', Some vendors have different URLs for generating an authentication token and refreshing an authentication token. If this is the case, enter the URL used for refreshing the authentication token.
- Scope - Some vendors allow you to request only specific data. If this is the case, enter the scope details as required by the vendor.
- Grant Type - Currently, Marketing Cloud Intelligence supports only the 'Authentication Code' type.
- After you’re done entering the authentication form click Generate Token. Enter your credentials in the vendor's authentication pop-up window. When using Oauth2 you must generate a token to pull data.
- Access token type - After a token is generated, the Access Token Type determines how it’s used. Make sure that this setting matches the vendor's settings.

