MySonicWall API Reference Guide
Generating Capture Client Token using MySonicWall API Key
You can generate the Capture Client token using MySonicWall API key.
To generate Capture Client token using MSW API key
-
Get your Capture Client tenantId (ProductGroupID) using the MSW API Key.
You can find the ProductGroupID for Capture Client on the MySonicWall Swagger page under General category with API call,
GET https://api.mysonicwall.com/api/hgms/get-cloud-tenants
. -
Get an access code for your tenant using the MSW API Token and the tenantId (ProductGroupID).
Replace the tenantid with ProductGroupID you received in step 1 and replace YOURAPIKEY with APIKEY generated according to Generating MSW API Key in the below curl example.
Curl-based example:
curl https://api.mysonicwall.com/api/generate-cscaccesscode -X POST -d "{\"tenantId\":\"YOURTENANTID\",\"tileName\":\"ISNSMSAFEENABLED\"}" -H "Content-Type: application/json" -H "X-API-KEY: YOURAPIKEY"
The generated access code is valid only for 5 minutes.
-
Generate the Capture Client API Token using the access code.
Sample API call:
POST https://captureclient-36.sonicwall.com/api/auth/getApiToken?cscaccesscode=NF80MDYzMTE4Ml5DNTYzQzk2QTFFQkE0RjA1ODk2MjU4RjJDQzA5Njk1OQ=
- Use the Capture Client API Token for Capture Client API calls for that specific tenant.
- For more information about CC API queries, refer to Capture Client API docs - captureclient-36.sonicwall.com/api/docs/.
- The Capture Client API token you generated is valid for 7 days.
- Your Capture Client region is the domain for the SonicWall Capture Client portal you log into. For Europe region, Capture Client URL should be changed to
https://captureclient-36eu.sonicwall.com
.
Was This Article Helpful?
Help us to improve our support portal