Encode URL Parameters

When creating a Survey123 link dynamically, or if you are manually creating many Survey123 links, you can use encodeUrlParams to programmatically encode the included URL parameters.

The encodeUrlParams operation allows you to pass a collection of Survey123 parameters and an encoded URL string is returned. It is not necessary to include any information about your survey, only the URL parameters that you wish to encode and a token are requried. The portalUrl parameter is only needed if you are working against ArcGIS Enterprise.

URL:https://survey123.arcgis.com/api/encodeUrlParams
Method:POST only
Privilege:None
Operation:None

Request parameters

ParameterRequiredDetails
tokentrueAn access token that identifies the authenticated user and controls access to restricted resources and operations.
paramstrueAn object containing the URL parameters that are to be encoded. See Parameters for web app for details on the parameters supported.
portalUrlfalseSpecifies the URL to the portal where the survey item is hosted.
        
1
2
3
4
5
6
7
8
{
    "token": "<TOKEN>",
    "params": {
          "field:submittedBy": "John Smith",
          "hide": ["field: submittedBy"]
    },
    "portalUrl": "<Portal URL>",
}

Response example

A JSON object which contains the property code which represents your URL parameters encoded.

    
1
2
3
4
{
  "code": "ShBmaWVsZDpjdXNUcmFja05vchRmaWVsZDpjdXNUcmFja05vPTEyMw==",
  "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.