API Script Command: generate_session_key

In the context of the client scripting API, the generate_session_key command causes the representative console to show the Generate Session Key dialog. Parameters can be passed to the command to customize the behavior.

Optional Parameters for the generate_session_key Command

public_portal_hostname=[string] The hostname of the public portal that should be selected by default when the Generate Session Key dialog is shown. The representative will still have the option to change the public portal on the dialog. This field has a maximum length of 255 characters.
session.custom.[custom field]=[string]

The code name and value of any custom fields. These fields must first be configured in /login > Management > API Configuration.

Each attribute must be specified as a different parameter. Each custom field has a maximum length of 1024 characters. The maximum total size of all combined custom fields, including the external key, must be limited to 10KB.

Parameters are optional for the generate_session_key command. Omitting them will simply cause the representative console to show the Generate Session Key dialog.

Query Examples: generate_session_key

Show the Generate Session Key dialog

https://support.example.com/api/client_script?type=rep&operation=generate&action=generate_session_key

Show the Generate Session Key dialog with the public portal hostname "support.example.com" selected

https://support.example.com/api/client_script?type=rep&operation=generate&action=generate_session_key&public_portal_hostname=support.example.com

Show the Generate Session Key dialog and associate custom attributes with any support sessions started using the session key or URL shown on the dialog

https://support.example.com/api/client_script?type=rep&operation=generate&action=generate_session_key&session.custom.custom_field1=Custom%20Value&session.custom.custom_field2=123