Duplicate result in users API

Duplicate result in users API

Hello! I am writing some Go code, to retrieve users from endpoint: https://cliq.zoho.com/api/v2/users, and I want to test the pagination so I send a limit of 1 and loop over the returned `next_token` until I get `has_more` set to false. 

I have three users, and instead of returning all 3 of them, it is returning twice the first one. I put some printfs in the middle of the execution, and this is what's happening: 

  1. "GET users?fields=all&limit=1"
  2. "Returned data " zohocliq.listUserType{
  3.   NextToken: "46ccbe60d0404344dcb5034327c77445baa9dcd491427bda5106e14aab793085",
  4.   HasMore:   true,
  5.   Data:      []zohocliq.userType{
  6.     zohocliq.userType{
  7.       Name:        "Cccccc",
  8.       DisplayName: "Cccccc",
  9.       EmailID:     "Ccccccvvvvvv@gmail.com",
  10.       ID:          "12341234",
  11.       Type:        "paid",
  12.     },
  13.   },
  14. }
  15. "GET users?fields=all&limit=1&next_token=46ccbe60d0404344dcb5034327c77445baa9dcd491427bda5106e14aab793085"
  16. "Returned data " zohocliq.listUserType{
  17.   NextToken: "9ba5efc5d7db3ebcdafb0cdc1c93fd02baa9dcd491427bda5106e14aab793085",
  18.   HasMore:   true,
  19.   Data:      []zohocliq.userType{
  20.     zohocliq.userType{
  21.       Name:        "Cccccc",
  22.       DisplayName: "Cccccc",
  23.       EmailID:     "Ccccccvvvvvv@gmail.com",
  24.       ID:          "12341234",
  25.       Type:        "paid",
  26.     },
  27.   },
  28. }
  29. "GET users?fields=all&limit=1&next_token=9ba5efc5d7db3ebcdafb0cdc1c93fd02baa9dcd491427bda5106e14aab793085"
  30. "Returned data " zohocliq.listUserType{
  31.   NextToken: "16bf27a63e1c88cbefe4baf75c819777baa9dcd491427bda5106e14aab793085",
  32.   HasMore:   true,
  33.   Data:      []zohocliq.userType{
  34.     zohocliq.userType{
  35.       Name:        "dev devlast",
  36.       DisplayName: "dev devlast",
  37.       EmailID:     "dev@ddd-oooooo.net",
  38.       ID:          "66667777",
  39.       Type:        "paid",
  40.     },
  41.   },
  42. }
  43. "GET users?fields=all&limit=1&next_token=16bf27a63e1c88cbefe4baf75c819777baa9dcd491427bda5106e14aab793085"
  44. "Returned data " zohocliq.listUserType{
  45.   NextToken: "",
  46.   HasMore:   false,
  47.   Data:      []zohocliq.userType{
  48.     zohocliq.userType{
  49.       Name:        "Test Account3",
  50.       DisplayName: "Test Account3",
  51.       EmailID:     "Cccccc.pppp@sssss.aaaa",
  52.       ID:          "00009999",
  53.       Type:        "paid",
  54.     },
  55.   },
  56. }

On the first call, I pass no `next_token` because, well, I have none. So the api returns a user, and a next token. When I use this token, I get a duplicate of the data, and I don't know exactly why. 
The documentation for this endpoint is https://www.zoho.com/cliq/help/restapi/v2/#retrieve-user


    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
                                              • Sticky Posts

                                              • Convert a message on Cliq into a task on Zoho Connect

                                                Message actions in Cliq are a great way to transform messages in a conversation into actionable work items. In this post, we'll see how to build a custom message action that'll let you add a message as a task to board on Zoho Connect. If you haven't created
                                              • Cliq Bots - Post message to a bot using the command line!

                                                If you had read our post on how to post a message to a channel in a simple one-line command, then this sure is a piece of cake for you guys! For those of you, who are reading this for the first time, don't worry! Just read on. This post is all about how
                                              • Cliq Bots - How to make a bot respond to your messages?

                                                Bots are just like your buddies with whom you can interact. They carry out your tasks, keep you notified about your to-dos and come in handy when you need constant updates from a third party application.  So, how can you make your bot respond to a message? The bot message handler is a piece of code triggered when a message is sent to the bot. Message handlers help you customise your bot responses to make it look conversational. The message input from the user can be either a string or an option selected
                                              • Cliq Bots - Get notifications about any action on an application with the incoming webhook handler!

                                                Webhooks can be used to get notified about events happening in other applications inside Cliq. All bots in Cliq have their own incoming webhook endpoint. This makes it simple to post messages to the bot from external applications. Unlike the send message
                                              • The Slash Command Series - Types of Command Suggestions

                                                Hi Everybody! I hope you guys tried the /zdocs command and now have an idea of how command suggestions with click to execute work. If you have no clue of what command suggestion is, I recommend you to take a look at all the Slash Command Series posts, especially the one on Command Suggestions ! This post is all about the different types of command suggestions.  Customise your command suggestions  Did you know you could customise your command suggestion list with a title, description, image? Well,


                                              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