Survey123 Generate Report - 498: Invalid token

02-03-2021 10:31 AM
Occasional Contributor


Our organization utilizes ArcGIS Online and ArcGIS Server (Non-federated). We have services on our GIS server that we add to ArcGIS Online and store the credentials. We then go on to use those services in Survey123. I then create reports for those Survey123 using the report functionality on I create my template and download it manually through and everything works. I now want to automate the report creation using the ArcGIS API for Python. I connect to the Survey Manager and get my specific survey. I run the generate_report function on my survey, but no output is produced. If I then go back to and look at my recent tasks under reports, I can see that it failed due to an invalid token (Screenshot). I'm assuming that it is failing due to underlying service being on ArcGIS Server and having the credentials stored. I am confused as it works if I manually go through the GUI on, but fails when using Python. Am I am not using the generate_report function correctly? or is this bug?



0 Kudos
1 Reply
Esri Regular Contributor

Hello @NikholaiO_Hara

Would I be able to obtain a copy of the script that is running into the issue/ a paired down script that reproduces the issue? 

We had a BUG BUG-000135295 for this behavior where the Survey123 report API was rejecting the token that the Python API was passing along. 

This issue was resolved with the 3.12 release that went live a little bit ago. 

Thank you, 


Thank you,
0 Kudos