Zoho Sign API Tools "No valid action"

Zoho Sign API Tools "No valid action"

Hello

Im performing all steps regarding the following tutorial: https://www.youtube.com/watch?v=KGIkyUUHJAI


My code is the following:


import requests
import json

def send_zoho_request():
   
    headers = {
        "Authorization": f"Zoho-oauthtoken {ZOHO_ID}"
    }
   
    files = {
        'file': ('acuerdo_firma.pdf', open('acuerdo_firma.pdf', 'rb'))
    }
   
    data = {
        "requests": [{
            "request_name": "Social Media policy",
            "actions": [{
                "recipient_email": "example@gmail.com",
                "action_type": "SIGN",
                "recipient_name": "Sebastian",
                "private_notes": "Please get back to us for further queries"
            }]
        }]
    }
   
    # Convert the data dictionary to a JSON string
    json_data = json.dumps(data)
   
    payload = {'data': json_data}
   
    response = requests.post(url, headers=headers, files=files, json=payload)
   
    if response.status_code == 200:
        print(response.json())
        return response.json()
    else:
        return f"Error: {response.status_code}, {response.text}"


# Usage
response = send_zoho_request()
print(f"Request ID: {response['requests']['request_id']}")

import requests

def send_zoho_submit(request_id):
    url = f"https://sign.zoho.com/api/v1/requests/{request_id}/submit"
   
    headers = {
        "Authorization": f"Zoho-oauthtoken {ZOHO_ID}"
    }
   

    # Body of the request
    data = {
            "requests": {
                "actions": [
                    {
                        "verify_recipient": False,
                        "action_id": f"{request_id}",
                    }
                ]
            }
        }

   
    # Sending the POST request
    response = requests.post(url, headers=headers, json=data)

    if response.status_code == 200:
        return "Request submitted successfully"
    else:
        return f"Error: {response.status_code}, {response.text}"

# Usage
# This is the RequestId from the image
result = send_zoho_submit(response['requests']['request_id'])
print(result)

The response from the API is the following: 

Error: 400, {"code":4008,"message":"Acción no válida","status":"failure"}

Why there is no valid action here?

Thanks in advance, 
Sebastian

      • Sticky Posts

      • Free webinar: E-signature legality in Latin America

        Saludos! Are you wondering if e-signatures are legally valid to use for your business documents in Latin America? We've got your answers! Join us on Thursday, November 21 for an exclusive webinar, where we'll dive into the legality of electronic signatures
      • Free webinar: Processing transactional paperwork with ease using Zoho Sign and Zoho Finance apps

        Hello everyone, Did you know you can securely send, sign, and manage your financial documents directly within Zoho Finance applications? Zoho Sign seamlessly integrates with Zoho Books, Zoho Invoice, Zoho Inventory, Zoho Checkout, Zoho Billing, and Zoho
      • Zoho Sign: Product updates - Mid - 2024

        Hello, everyone! We've crossed the halfway point in 2024, and here's what Zoho Sign has been up to lately. We've been part of several Zoho User Groups, and we've started creating video content for our developers. Along with this, we have once again been
      • Explore the legality of electronic signatures worldwide with Zoho Sign

        Hello, everyone! We are pleased to announce our new initiative exploring the legality of electronic signatures around the globe in detail. As more businesses go digital, understanding the legal requirements for e-signatures across different jurisdictions