API connections for dummies

API connections for dummies

I feel really stupid asking this, but my brain doesn't seem to work properly when thinking about API connections.

I have a third party app that I'm trying to connect to.  I have to send credentials (API key in header, username/password in parameters) to the login URL get a token that is valid for an hour.  I then send another request (API key and token in header, record information I want to get data from in parameters) to different URLs (depending on the data I want). 

Inside a function, I can do this without issue.  I don't like the API key, username and password being visible so assumed that a Connection was the right thing to do.... but can I work out how to do it?!  Absolutely not.  

My issue is mainly the username and password - I've got the API key in the header in the connection, which seems to work.  I've setup the username and password as dynamic parameters.... but how do I add these to a map in order to pass them?! At the moment I've got the actual username and password in my code, getting added into a map.

Please can someone give me a really basic guide as to how I can do this?  I've read lots and still can't work it out.  I don't have a secret key or anything.  I just have an API key, username and password.  It's OAS3 - not sure if that's relevant.  

Much appreciated!!

    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