Invalid OAuth Token When Using Zoho CRM API with Postman

Invalid OAuth Token When Using Zoho CRM API with Postman

We're in the process of integrating Zoho CRM with our Django backend and currently testing the API endpoints via Postman. I've forked Zoho's official CRM REST API collection in Postman for this.

Steps Taken:

  1. Created a Self Client via Zoho API Console:
    URL: https://api-console.zoho.in/client/xxxxx

    • Set scope: ZohoCRM.modules.ALL

    • Validity: 10 minutes

    • Used region domain: .in (since we’re using Zoho India services)

  2. Generated Authorization Code using the Authorization Code Grant flow.

  3. Exchanged Authorization Code for Tokens:

    Request:

    URL: https://accounts.zoho.in/oauth/v2/token
    Method: POST
    Authorization: None
    Body (form-data):
    {
      client_id: "my_client_id",
      client_secret: "my_client_secret",
      redirect_uri: "https://www.getpostman.com/oauth2/callback",
      code: "generated_code_from_api_console",
      grant_type: "authorization_code"
    }
    

    Response:

    {
      "access_token": "1000.xxxxxx.yyyyyy",
      "refresh_token": "1000.111111.222222",
      "scope": "ZohoCRM.modules.ALL",
      "api_domain": "https://www.zohoapis.in",
      "token_type": "Bearer",
      "expires_in": 3600
    }
    
  4. Attempted to Upsert a Lead:

    Request:

    URL: https://www.zohoapis.in/crm/v7/Leads/upsert
    Method: POST
    Authorization: Zoho-oauthtoken 1000.xxxxxx.yyyyyy
    Body:
    {
      "data": [
        {
          "Email": "testuser@test.com",
          "Last_Name": "user",
          "First_Name": "test"
        }
      ],
      "duplicate_check_fields": ["Email"]
    }
    

    Response:

    {
      "code": "INVALID_TOKEN",
      "details": {},
      "message": "invalid oauth token",
      "status": "error"
    }
    

Notes:

  • I've verified that both the token generation and API requests are using the .in domain.

  • Tried this in both the production and sandbox environments:


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Kaizen #217 - Actions APIs : Tasks

            Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
          • Kaizen #216 - Actions APIs : Email Notifications

            Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
          • Kaizen #152 - Client Script Support for the new Canvas Record Forms

            Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved
          • Kaizen #142: How to Navigate to Another Page in Zoho CRM using Client Script

            Hello everyone! Welcome back to another exciting Kaizen post. In this post, let us see how you can you navigate to different Pages using Client Script. In this Kaizen post, Need to Navigate to different Pages Client Script ZDKs related to navigation A.
          • Kaizen #210 - Answering your Questions | Event Management System using ZDK CLI

            Hello Everyone, Welcome back to yet another post in the Kaizen Series! As you already may know, for the Kaizen #200 milestone, we asked for your feedback and many of you suggested topics for us to discuss. We have been writing on these topics over the

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ






                                ご検討中の方