Skip to main content

Hi there,

I am trying to generate a survey123 report using FME. I have downloaded and added the custom Survey123ReportGeter transformer however I am using a portal connection instead of an AGOL connection:

 


After this step i have the Tester that checks for the submit_response_body beginning with {"jobId" however the flow always fails here. I get an invalid token message in my submit_response_body:

{"error":{"message":"498: Invalid token.","code":498},"success":false}

I am not sure if the request URL needs to be different for portal? or if the token i am providing in my query string parameters is not being read in properly…

Any help would be greatly appreciated.

This is what my transformer looks like:

 

 

I have successfully got the job to submit using the same endpoint:

https://survey123.arcgis.com/api/featureReport/createReport/submitJob

this returns the jobId # and jobStatus of esriJobSubmitted.

I am also able to access this endpoint:

https://survey123.arcgis.com/api/featureReport/queryJobs

however accessing the endpoint that returns the resultFile which should here here:

https://survey123.arcgis.com/api/featureReport/jobs/@Value(jobId)

is still hitting me with an invalid token. Has anyone managed to configure this for their portal before?

Cheers

 


Updating this in case anyone else needs it:

Works after adding survey123 as an allowed origin in portal. Also need to expose portalInfo in the S123 webhook and use that as the token. Generating one from within the workspace results in an invalid token...