Projects API Scripting to add followers to tasks

Projects API Scripting to add followers to tasks

I've written a script that looks like it works, except it doesn't. The Python script does the following, but I've left out token refreshes and pauses that exist in the script:

  1. Queries our company account and returns an enumerated list of all active projects and project IDs.
  2. Prompts user to enter the number of the project they'd like to add followers.
  3. Queries the project for tasks and subtasks, printed "This project has XX tasks" and prints an enumerated list of users and User IDs.
  4. Prompts user to enter the number user(s) you would like to add as a follower to all tasks and enter 0 to finish adding users.
  5. Adds users and echoes success or failure. See example below:

Retrieving access token...
Access token from tokens.json: 1000.aNOTTHEREALTOKENHERE123216546546546546461
Access token retrieved successfully.
Attempting to add user 123456789 to task 12345647890123456789. Status code: 200
Successfully added user 123456789 to task 12345647890123456789
Attempting to add user 234567890 to task 12345647890123456789. Status code: 200
Successfully added user 234567890 to task 12345647890123456789
Attempting to add user 345678901 to task 12345647890123456789. Status code: 200
Successfully added user 345678901 to task 12345647890123456789
Retrieving access token...
Access token from tokens.json: 1000.aNOTTHEREALTOKENHERE123123123123123123
Access token retrieved successfully.
Attempting to add user 123456789 to task 23456478901234567890. Status code: 200
Successfully added user  123456789 to task 23456478901234567890
Attempting to add user 234567890 to task 23456478901234567890. Status code: 200
Successfully added user 234567890 to task 23456478901234567890
Attempting to add user 345678901 to task 23456478901234567890. Status code: 200
Successfully added user 345678901 to task 23456478901234567890
Done adding followers to all tasks

According to the script, everything is peachy, but when I look at the project through the GUI, there's no change made.
Any idea what might be causing me this issue? It definitely returns my projects and users, and acts like it successfully adds follower.

Is this the correct string to add a follower to a task?
  1. follow_user(task_id, project_id, user_id_1, headers)
Where else might I be going wrong here? Thanks for any help. I'm trying it again in PHP, FWIW...

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方