Creating a Custom OAuth App
When to Create a Custom OAuth App
CData embeds OAuth Application Credentials with CData branding that can be used when connecting via either a Desktop Application or from a Headless Machine. Creating a custom OAuth application is, however, required when using a web application.For service accounts, you must always create a custom OAuth application.
You may choose to create your own OAuth Application Credentials when you want to
- control branding of the Authentication Dialog
- control the redirect URI that the application redirects the user to after the user authenticates
- customize the permissions that you are requesting from the user
User Accounts
Create an OAuth App for User Account Authentication
Follow the procedure below to register an app and obtain the OAuthClientId and OAuthClientSecret.Desktop Applications
- Log into the Google API Console and open a project.
- Select the API Manager from the main menu.
- Select Credentials > Create Credentials > OAuth Client Id. Then click Other.
- Select Library > DCM/DFA Reporting And Trafficking API > Enable API.
Web Applications
- Log into the Google API Console and open a project.
- Select the API Manager from the main menu.
-
If you are connecting from a desktop application, click Credentials > Create Credentials > OAuth Client Id. Then click Other.
If you are connecting from a Web application, click Web Application. In the Authorized Redirect URIs box, enter the URL you want to be used as a trusted redirect URL, where the user returns with the token that verifies that they have granted your application access.
- Select Library > DCM/DFA Reporting And Trafficking API > Enable API.
Headless Machines
- Log into the Google API Console and open a project.
- Select the API Manager from the main menu.
- Select Credentials > Create Credentials > OAuth Client Id. Then click Other.
- Select Library > DCM/DFA Reporting And Trafficking API > Enable API.
Create an OAuth App for Service Account Authentication
To obtain the necessary authentication properties, follow the steps below to create an OAuth application and generate a private key:
- Log into the Google API Console and open a project.
- Select the API Manager from the main menu.
- Select Create Credentials > Service Account Key.
- In the Service Account menu, select New Service Account or choose an existing service account.
- If you are creating a new service account, select one or more roles. You can assign primitive roles at the project level in IAM and Admin; other roles enable you to further customize access to Google APIs.
- In Key Type, select the P12 key type.
- Create the app to download the key pair. The private key's password is displayed: Set this in OAuthJWTCertPassword.
- In the service accounts section, click Manage Service Accounts and set OAuthJWTIssuer to the email address displayed in the service account Id field.