Parentwindow reference error

Parentwindow reference error

Hi,
I have a use case where I would like to embed an iframe in the Zohodesk layout and open our application from inside the iframe. Using this iframe I can do various operations using Zoho Desk API.So, I created the extension using Zoho Desk Extension documentation and was able to open my application within the iframe. See the image below for more clarity.
                                                
Now I want the contacts from the Zoho Desk portal through Zoho API('https://desk.zoho.com/api/v1/contacts')  within my application which is currently loaded in an iframe. So, the issue I am facing is that  I get the instance of the Zoho desk within my app but cannot get the response of the contact API and get the parent window reference error. However, the API gives the response when it is called from the widget.html file this problem only occurs when I called the API from the iframe and I only need this contact in my app not in the extension.
            



I did the following step. 
  1. create extension.
  2. Load my application in an iframe.
  3. upload extension.
In case you are wondering why I want to open my app in an iframe because we are looking for API CTI integration to connect our Cloud-based Call application to Zohodesk.
I have uploaded the extension code below in case you want to check. 

    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