Zoho using API

Zoho using API

Hello everyone,

I'm trying to implement Zoho on my websites using it's API. I generated my Auth token on
  1. https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=ZohoCRM/crmapi&EMAIL_ID=MY_EMAIL&PASSWORD=MY_PASSWORD&DISPLAY_NAME=CustomApi
Now I'm trying to fetch a list of received emails using the following code but whatever I try I get a response
  1. {"data":{"errorCode":"URL_RULE_NOT_CONFIGURED"},"status":{"code":404,"description":"Invalid Input"}}
The code I'm using for this is

  1. <?php
  2. $auth_token = "MY_AUTH_TOKEN";

  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, "https://mail.zoho.com/api/accounts/messages/view");
  5. curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Zoho-authtoken ".$auth_token]);
  6. curl_exec($ch);
  7. ?>
Could someone point me in the right direction? Thanks in advance.