Zoho Desk associate accounts with contacts

Zoho Desk associate accounts with contacts

  1. https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_Associateaccountswithcontact - API method
  2. //
  3. paramMap = Map();
    dataList = list();
    rowMap = Map();
    rowMap.put("id",Account_ID);
    rowMap.put("isAccountTicketsViewable",true);
    dataList.add(rowMap);
    paramMap.put("data",dataList);
    info paramMap;
    response = invokeurl
    [
        url :"https://desk.zoho.com/api/v1/contacts/" + Contact_ID + "/associateAccounts"
        type :POST
        parameters:paramMap.toString()
        connection:"desk"
    ];
    info response;
I am getting answer:
{"data":[{"id":XXXXXXXXXXXXXXX,"isAccountTicketsViewable":true}]}{"errorCode":"FORBIDDEN","message":"You are not authorized to access this resource."}

Is there exist way to make it work simply with Desk Connection, without generate
Zoho-oauthtoken?

If no, what best way to generate
Zoho-oauthtoken with deluge, better all generations in one Custom Function or mb with some Global Variabales?

Thank You!

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now