Creating a Custom OAuth App
When To Create a Custom OAuth Application
CData embeds OAuth Application Credentials with CData branding that can be used when connecting via a desktop application or headless application.You may choose to use 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
Create and Configure a Custom OAuth App
To obtain an OAuthClientId, OAuthClientSecret, CallbackURL, and OrganizationId you first need to create an application linked to your Zoho Books account. You must then register your application with Zoho's Developer console to get your Client Id and Client Secret.
Follow these steps to create an application linked to your Zoho Books:
- To register your application, go to https://accounts.zoho.com/developerconsole.
- Click Add Client ID and specify a client Name. l
- Fill the required details in the form.
- Set the Auth Callback URL to https://localhost:33333 or a port of your choice.
- Choose Client Type as WEB Based/Javascript/Mobile, then click on Create.
- In Zoho Books, your business is termed as an organization. If you have multiple businesses, set each of those up as individual organizations. Each organization is an independent Zoho Books Organization with its own organization Id, base currency, time zone, language, contacts, reports, etc.
- The parameter organization_id along with the organization Id should be sent in with every API request to identify the organization.
- Click Organization Name, on the top right section. Choose the Organization Id from the list of organizations.
- If the value of Organization Id is not specified in the connection string, the cmdlet makes a call to get all the available organizations and selects the first organization Id as the default.
- After completing the changes the browser prompts you to save your configuration.
After you are done creating a new client, it is displayed on your screen. From there, click More Options > Edit to reveal your newly created application's Client Id and Client Secret. Use these credentials to connect to Zoho Books by setting the following connection properties:
- OAuthClientId: Set to the Client Id.
- OAuthClientSecret: Set to the Client Secret.
- CallbackURL: Set to the Auth Callback URL.