Migrating to Oauth 2.0

Migrating to Oauth 2.0

This article will help you generate access and refresh tokens from the existing auth token for redirection based applications and self-client applications. You can use the API version 1.1 when:
  1. Your application has multiple users and it obtains their username and password to generate an auth token
  2. Users input their auth tokens

Migration for redirection based application

Prerequisite

The application owner must share the client ID, auth token scopes, and the required Oauth scopes over an email to support@zohocampaigns.comAt Zoho Campaigns, we will validate the details and configure them in Zoho Accounts. After successful validation, we will inform the application owner about the client upgrade over an email.

How it Works?

Migration for redirection based applications happens in a phased manner.
  1. After successful validation from the service team, the external application will access the "Migration for Redirection-based Applications" API with the client ID, client secret, and auth token.
  2. Zoho Accounts will check whether the parameters passed in the request are already verified.
  3. After successful validation, Zoho Accounts will provide the Oauth access and refresh tokens to the application.

Request URL

Request method

POST

Parameters

Parameter
Data type
Description
client_id
string
Specify the client ID you obtained while registering your application
client_secret
string
Specify the client secret generated from the connected application.
grant_type
string
The grant type must be authtooauth.
authtoken
string
Specify your auth for token.

Possible Errors 

Error code
Description
invalid_grant
The grant_type is not specified as authtooauth.
invalid_client
The client ID you specified is wrong.
(or)
The auth to Oauth mapping entry for the valid client is not made in accounts.
invalid_authtoken
The auth token you specified is wrong.
(or)
The auth token scope mismatches with the pre-shared auth scopes.
invalid_scope
The Oauth scope you specified is invalid.

Note:
  1. The maximum number of migration requests you can make is 60 per minute and 100 per hour.
  2. After the generation of an Oauth token, the system deletes the old auth token after 1 day.
  3. The maximum number of times a client can pass an invalid auth token is 20. If you exceed this limit, the system will block the client and throw the "access_denied" error message.

Migration for self-client applications

You can use this option when your application is a standalone server-side application performing a back-end job, and you do not have a domain and a redirect URL.

How it Works?

Migration for self-client applications happens in a phased manner.
  1. The external application will access the "Migration for Self-Client Applications" API with the client ID, client secret, auth token, and the required Oauth scopes.
  2. Zoho Accounts will check whether the service names of the auth token and Oauth scopes match.
  3. After scope validation, Zoho Accounts will check whether the application owner and the auth token owner are the same.
  4. If the validation is successful, Zoho Accounts will generate an Oauth token for the external application. Otherwise, the system will throw the "access_denied" error message.
  5. Zoho Accounts will send an email to the user about the client upgrade.

Request URL

Request method

POST

Parameters

Parameter
Data type
Description
client_id
string
Specify the client ID you obtained while registering your application.
client_secret
string
Specify the client secret generated from the connected application.
grant_type
string
The grant type must be authtooauth.
authtoken
string
Specify your auth token.
scope
string
Specify the Oauth scopes to access data from Zoho Campaigns. For more details about Zoho Campaign scopes, refer Access Token section of the Zoho Campaigns REST API Documentation.

Possible Errors

Error code
Description
invalid_grant
The grant_type is not specified as authtotoauth.
access_denied
The auth token you specified is already used to generate an Oauth token.
invalid_client
The client ID you specified is wrong.
invalid_authtoken
The auth token you specified is wrong.
invalid_scope
The Oauth scope you specified is invalid.

Note:
  1. The maximum number of migration requests you can make is 25 per minute and 60 per hour.
  2. After the generation of an Oauth token, the system deletes the old auth token after one day.

Error Codes

The set of error codes with their values are explained in this link

    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION





                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          CRM Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources