Mobile Connect for macOS 5.0
- Mobile Connect for macOS 5.0
- Introduction to Mobile Connect
- Installing and Connecting
- Preferences and URL Control
- Monitoring, Logs, and Troubleshooting
- SonicWall Support
Using the callbackurl Command Parameter
callbackurl
is an optional query string argument for each of the connect
/disconnect
/addprofile
commands. If a callback URL is included in a command, then that URL will be launched by Mobile Connect once the command has been completed. While invoking Mobile Connect using a URL, a third-party application can use the callbackurl
parameter to include a URL to be launched by Mobile Connect after it completes the requested action.
The callbackurl
value can contain special tokens that are evaluated and dynamically replaced by Mobile Connect to provide additional status and connection information back to the app that is opened by the callback URL. Tokens are evaluated in place, in the same order in which the tokens were specified.
To ensure that it functions properly, the base callbackurl
URL value format should be RFC 1808 compliant and should be able to be launched independently of Mobile Connect. For example, it should launch through a web page.
URL syntax for a callbackurl
<scheme>://<net_loc>/<path>;<params>?<query>#<fragment>
The URL value of callbackurl
must be properly URL encoded to ensure that Mobile Connect can process the callback URL correctly. All appropriate characters in values of parameters used in URLs are required to be URL encoded. For instance, to match a space, enter %20
.
Any number of dynamic tokens from the Dynamic tokens supported by callbackurl table can be specified in the <query>
element of the URL. These can be used by administrators when configuring the callback URLs on a web site or in an email to their users, such as to auto-configure a VPN profile. The dynamic tokens are useful because they allow Mobile Connect to provide information to the website or app that is being launched when the callback URL is opened.
Dynamic token | Description |
$ERROR_CODE$
|
The numerical value of the error from the failed connection attempt. |
$ERROR_MESSAGE$
|
The string value of the error message from the failed connection attempt. |
$LOGIN_GROUP$
|
The string value of the authentication login group or realm. Applies to SMA 1000 Series connections only. |
$COMMUNITY$
|
The string value of authentication community. Applies to SMA 1000 Series connections only. |
$ZONE$
|
The string value of EPC (End Point Control) zone. Applies to SMA 1000 Series connections only. |
$TUNNEL_IP$
|
The string value of the Mobile Connect IPv4 client address. |
$TUNNEL_MODE$
|
One of split , split-nonlocal , redirectall , or redirectall-nonlocal , depending on the tunnel mode. Applies to SonicWall SMA 1000 Series connections only. |
$ESP_ENABLED$
|
One of yes or no, depending on if ESP (Encapsulating Security Payload) is enabled. Applies to SonicWall SMA 1000 Series connections only. ESP is a protocol used to provide confidentiality, data origin authentication, connectionless integrity, an anti-replay service (a form of partial sequence integrity), and limited traffic flow confidentiality. |
Examples of the callbackurl command
Callback URL (1):
customapp://host?status=$STATUS$&login_group=$LOGIN_GROUP&error_code=
$ERROR_CODE$
Corresponding full URL with URL encoded callbackurl value:
mobileconnect://connect?sessionid=<teamid>&callbackurl=customapp%3A%2F%2Fhost
%3Fstatus%3D%24STATUS%24%26login_group%3D%24LOGIN_GROUP%26error_code%3D%24
ERROR_CODE%24
Callback URL (2):
myapp://callback?status=$STATUS$&login_group=$LOGIN_GROUP&error_code=
$ERROR_CODE$
Corresponding full URL with URL encoded callbackurl value:
mobileconnect://connect?sessionid=<teamid>&callbackurl=myapp%3A%2F%2Fcallback
%3Fstatus%3D%24STATUS%24%26login_group%3D%24LOGIN_GROUP%26error_code%3D%24
ERROR_CODE%24
Callback URL (3):
http://server/example%20file.html
Corresponding full URL with URL encoded callbackurl value:
mobileconnect://connect?callbackurl=http%3A%2F%2Fserver%2Fexample%20file.html
Was This Article Helpful?
Help us to improve our support portal