Create Campaign using API: 1007errorUnauthorized request

Create Campaign using API: 1007errorUnauthorized request

Hi there, 

I'm trying to create a campaign using the APIs and following step by step this documentation https://www.zoho.com/campaigns/help/developers/create-campaign.html, but I have an
1007 error Unauthorized request.

I created (I'm using PHP) the code to find access token and the refresh token as documentation said with POST request; after that I used the getmailinglists GET request to find the JSON for the  'list_details' parameter ( mandatory to create the campaign).

Now I'd like to create the campaign. here my code:
  1. // CREATE CAMPAIGN:
  2. $access_token = 1000.xxxxxxxxxxxxxxxxxxxxx ;
  3. $headers = array("Content-Type: application/x-www-form-urlencoded",
                        "Authorization: Zoho-oauthtoken $access_token");


  4. $list_details = '{"code":"0","uri":"/api/getmailinglists","version":"1",
    "list_of_details":[{"date":"20 Feb 2018, 05:30 PM","deletable":"true","segments":{},"listdesc":"","list_created_time":"00:30 PM","noofunsubcnt":"0","lockstatus":"unlocked",
    "listkey":"xxxxxxxxxxx","sentcnt":"1","owner":"Name Surname","list_campaigns_count":"1","created_time":"1519173003000",
    "noofcontacts":"4","editable":"true","listname":"Test","listdgs":"xxxxxxxxxx",
    "noofbouncecnt":"0","issmart":"false","list_created_date":"20 Feb 2018","listnotifications":"[]","listunino":"xxxxxxxxxx","zuid":"xxxxxxxx","servicetype":"1","sno":"2",
    "is_public":"false","otherslist":"false","zx":"12698717a"}],"requestdetails":{"fromindex":1,"range":20,"total_list_count":1,"sort":"Recently Created"},"status":"success"}';
       
  5. $args = array(
            'campaignname' => 'New newsletter',
            'from_email' => 'name@mail.it',
            'subject' => 'test html',
            'content_url' => 'https://www.mysite.it/zoho/campaign.html',
            'list_details' => $list_details
        );

        $curl_campaign = curl_init();
        curl_setopt($curl_campaign, CURLOPT_URL,"https://campaigns.zoho.eu/api/v1.1/createCampaign");
        curl_setopt($curl_campaign, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($curl_campaign, CURLOPT_HEADER, $headers);
        curl_setopt($curl_campaign, CURLOPT_POST, true);
        curl_setopt($curl_campaign, CURLOPT_POSTFIELDS,$args);
        $result_campaign = curl_exec($curl_campaign);
        curl_close($curl_campaign);

        echo $result_campaign;

    }
Why I still having the 1007 error?

I hope for a quick response,
thanks
Alessandra

    • Sticky Posts

    • Marketer's Space: Proven tips to improve open rates – Part II

      Hello Marketers! Welcome back to another post in Marketer's Space! We're continuing from where we left off a fortnight ago. We ended the previous post discussing the subject line, and we'll continue from there. Let's dive right in. Pre-header Pre-header
    • Tip of the week 03 - Sending emails in batches

      Today's marketers not only want their email marketing to be efficient, but also smart. For an email campaign, you may think you have all the essential elements for lead conversion—a big mailing list, an attractive template design, and the most-engaging message content, but after hitting the ‘send’ button, you may not get the expected conversions. Wondering why? Here’s one of the major reasons. Many marketers miss out on sending the email campaign the right way. Did you know that you should not be
    • Tip of the week 04 - Know about your recipients' 'prime open time.'

      In today's market, the importance of customer behavior is astounding, with a vast amount of research and resources going into finding how customers make decisions. The process of persuading your customers to open your email and click on your call-to-action becomes easy when you understand the psychology behind their behavioral traits. Time to turn into a psychologist! Let's get to the basics—you want your emails to resonate well with your recipients. So, what's the primary thing involved here? It's
    • Zoho Campaigns Expert Diaries on SoundCloud, Spotify, Apple Podcasts, and YouTube

      Hi email champs,  As email marketers, we find great lessons in each other's works—be it the subject lines that worked good, the design that was received well, or the CTA that had the maximum clicks. Email marketing encompasses a wide variety of topics spanning everything from creation and design to development and deliverability.  Here's when we from the Zoho Campaigns team found the need to build an email marketing community comprising of seasoned marketers and email geeks who can help each other
    • Email Deliverability Tip #3: Seal the deal with the preheader

      In the last post, we learned about the subject line. Today we'll be learning about the preheader. A preheader is the short text that follows the subject line in an email. The preheader is designed to hint at what your email message is all about. A good preheader should act as a second subject line and convince your contacts to open the email. Now, let's learn the best way to craft a preheader. Your subject line and preheader should work together and accurately convey the gist of your email. Keep
      • Recent Topics

      • Ask the Experts - Live Q&A webinar

        Hello Community, We’re excited to host our very first Ask the Experts session! Join us on 7 April 2026 from 11 a.m. to 12 p.m. (IST) for this live webinar Q&A session, where you will have an opportunity to connect directly with our product experts, gain
      • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

        Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
      • Kaizen #235 - Automating record restoration using Recycle Bin APIs in Zoho CRM

        Welcome to another Kaizen week. Here's a question that came up in our developer forum: "I'm working on a piece of software to automate conversion of Leads into Deals based on order status from my company's website. There are some cases where a previously
      • Open PDFs using Zoho PDF Editor

        Hello users, In this article, we will be exploring the open PDF capability in Zoho PDF Editor to collaboratively edit PDFs, insert text and images, add fillable and e-signature fields, and more. You can upload PDFs upto 50 MB or 150 pages. Password-protected
      • One Contact with Multiple Accounts with Portal enabled

        I have a contact that manages different accounts, so he needs to see the invoices of all the companies he manage in Portal but I found it not possible.. any idea? I tried to set different customers with the same email contact with the portal enabled and
      • Bank Feeds Breaking Constantly

        Hey Everyone, I have already reached out to support about this issue but I am wondering if anyone else is having the same issue. My bank feeds keep breaking within days of me fixing them by updating the credentials. Its been happening for a while and
      • Print Sales Orders, Purchase Orders or Invoices from API

        Hello, Is it possible to use the print option that is available in Sales Orders Purchase Orders and Invoices with the API?. I don't see any information in the docs about this. Thanks
      • Timed addition to segments

        Hi there - hoping you can help me figure out a graceful way of doing this: • I want to add contacts to a Segment in Campaigns based on a Stage pick-list field value X in CRM - that bit's fine. The problem is that I only want to add them to the Segment
      • Zoho Developer AI Agent = Claude AI + MCP Server + Zoho Ecosystem

        Hello Zoho Community 👋 I’m excited to share a recent integration we’ve worked on at Officehub Tech: ✅Claude + MCP Server + Zoho Creator Zoho Developer AI Agent – an AI-powered Zoho automation platform This solution connects Zoho applications with an
      • Dynamic Questions in Zoho Forms

        Is it possible to add dynamic questions (like displaying a user’s name) in Zoho Forms? I know this is possible in surveys, but can we implement similar functionality in Zoho Forms?
      • Cliq iOS can't see shared screen

        Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
      • Google Fonts Integration in Pagesense Popup Editor

        Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to enhance Zoho Pagesense’s popup editor with Google Fonts support. Current Limitation: Currently, Pagesense offers a limited set of default fonts. Google Fonts
      • CRM

        How do I build an email funnel of 10 emails with decision tree ie; if yes use this email if no use this email. Also I cannot figure out how to add more groups or see my whole groups. I've set up different groups like attorneys is one group of companies/people
      • WebDAV support

        I need WebDAV support so that I can upload/download (and modify) documents from my local file system. Is anything planned in his direction?
      • Replying from same domain as a catch-all?

        I have 2 domains setup on Zoho, both with associated email addresses. They look something like this: john@example.com (primary address) john@test.com (this domain also has a catch-all setup) I use the catch-all for test.com as a public-facing email address
      • Is there a way to show contact emails in the Account?

        I know I can see the emails I have sent and received on a Contact detail view, but I want to be able to see all the emails that have been sent and received between all an Accounts Contacts on the Account Detail view. That way when I see the Account detail
      • Internal Fillable Contract with Zoho Writer (Before Sending to Client)

        Hi everyone, I’m trying to automate the following process in Zoho CRM and would appreciate some guidance. Process: When a Deal moves to a specific stage, CRM triggers an automation. CRM sends a contract template to an internal team member so they can
      • Standard practice rerun updated deluge function over existing recordes

        Hi folks, we have a function which is triggered via webhook from a third-party solution which then calls another api with a contact-id and gets a json payload back and then parses that data to custom fields in our CRM to the record id. As requirements
      • can change deal colors in bigin?

        can be super useful if we can change colors deals process  any way to do it?
      • Import Quote from CRM into document in Writer?

        Hi, I created a quote for a proposal in the Zoho CRM and was wondering if there is a way to embed the quote into a document in Zoho Writer so I can make our sales proposals look a little nicer. Is that possible?
      • Zoho Sheet for Desktop

        Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
      • Can I convert MSG to HTML on Mac?

        Yes, you can convert MSG files to HTML on a Mac using software Aryson MSG file Converter. This tool allows you to convert Outlook MSG emails into multiple formats, including HTML, PDF, EML, PST, and more. It preserves all email content, attachments, metadata,
      • Duplicate Leads Notification Help!

        Hello! I have several web forms that have a duplicate lead notification that are being sent to the creator of the web form. I understand how to change the form entry notification, but I am specifically looking to change the recipient of the "Duplicate Lead" notification. Any help you can offer is greatly appreciated! TIA, ~ Jenn
      • Adding Calendar Display to Home Page

        I would like to display my calendar in a module on the Zoho CRM Home Page. I can't figure out a way to do this.  Is it possible to display the CRM Calendar on the Home Page?  
      • Schedule a Call by Date and Time when a specific lead status is selected

        Hi Wanting to create a workflow where a call can be scheduled by date & time when a specific lead status is selected. Can only currently set the date by Due Date - Trigger Date - Plus 'x' day(s) Thanks
      • Incoming email replies not automatically associating with Deals/Opportunities - Is this possible in Zoho CRM?

        Hello Zoho Community, I'm running a travel agency (B2B and B2C) and we've been struggling with what seems like a basic functionality that we cannot get to work properly. Our use case: We send emails to suppliers (hotels, transportation companies) and
      • Duplicate Leads Concerns with Round Robin and Lead Approval Process

        It is great to have the Duplicate Lead Approval Process, there are a few issues with the process that I would greatly appreciate taken consideration in enhancing. It appears that A Lead comes in Lead owner assigned by the Round Robin Check for Duplicate,
      • Private email threads

        When sending a Private email or receiving a response once the email thread has been marked as 'Private'- is there a way to trigger the system to "restart the clock"? I am finding that when someone responds to a 'Private' thread that it is opening the
      • SLA Notification

        Team members have been receiving this notification and feel as though it is as random. Explanation on this notification is appreciated! Also, is there a way to disable this notification?
      • Map: Output None

        Hi, Checking if you help me inspect this block The code below triggers during Successful form Submission from another Form. // rec_a = formA[ID!=0]; rec_b = formB[ID!=0]; ListA = List(); //subformA for each recA in rec_a.ItemSubform { for each recB in
      • Use arbitrary images in deluge

        I am sending emails from my deluge code and I would like to be able to include a few images in the email template. While I know that I could put the on a website somewhere and link to them in the HTML, that is not what I want due to email client security
      • How to add "All Open AND Overdue" back to the Home Page Task Component?

        Hi everyone, I’m looking for a way to restore the Tasks component dropdown list on the Zoho CRM Home Page. Since the recent update to the Task area in my Home Page Classic View, the dropdown options (e.g., My Next 7 Days + Overdue) are too restrictive
      • Sync Attachments in Comments from Zoho Desk to Zoho Projects

        Hello Zoho Desk Team, We hope you're doing well. We are actively using the Zoho Desk–Zoho Projects integration, especially for reporting and managing bugs/issues between support and development teams. Current Limitation: After creating a bugs/issues via
      • Add a way to connect Log360 Cloud logs with Zoho analytics

        Hi, Several month ago Log360 Cloud was added to zoho one - and this is great. But as far as I see there is no prebuilt way to connect Zoho analytics to the logs we have in Log360 Cloud. Please add a prebuilt connection like we have for so many other zoho
      • Auto sync Photo storage

        Hello I am new to Zoho Workdrive and was wondering if the is a way of automatically syncing photos on my Android phone to my workdrive as want to move away from Google? Thanks
      • Funcionalidades y configuration ZohoDesk

        Creo que no estoy sacando el provecho adecuado a la application quisiera solicitar una capacitación al respecto
      • How to call Functions and perform Write Operations using Page Scripts?

        Hi everyone, How to call a function from a Zoho Creator application within a Page Script, also how to perform write operations (adding or updating records) using page scripts?
      • Connecting Airwallex in Zoho Books

        I have a question. I’m trying to connect our Airwallex account to Zoho Books, but the integration does not seem to work. Could you please guide me on how to properly connect Airwallex? I need to see the expenses also, since it only shows the profits now
      • Questions Regarding Helpdesk & SalesIQ Customization and Email Setup

        Hello, I hope you’re doing well. I have a few questions regarding Helpdesk and SalesIQ: Can the emails sent to customers via helpdesk tickets be fully customized — including signature, subject line, and other elements? Also, is it possible to send these
      • Button Duplication when emails forwarded or replied

        When I create a new email template in campaigns and send it out it looks fine to all the users, however if that email is then on forwarded or replied to then all buttons within the email duplicate.  See below The one on the left is the original one.
      • Next Page