You can call this operation to modify the Wi-Fi settings of a Smart Access Gateway (SAG) device.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ModifySagWifi

The operation that you want to perform.

Set the value to ModifySagWifi.

IsEnable String Yes True

Specifies whether Wi-Fi is enabled. Valid values:

  • true: enables Wi-Fi.
  • False: disables Wi-Fi.
RegionId String Yes cn-shanghai

The ID of the region where the SAG instance is deployed.

SmartAGId String Yes sag-whfn****

The ID of the SAG instance.

SmartAGSn String Yes sag32a30****

The serial number of the SAG device.

SSID String Yes aliyun_sag_123456***

The service set identifier (SSID) of the Wi-Fi network.

The name must be 1 to 31 characters in length, and can contain digits and letters.

IsBroadcast String No True

Specifies whether broadcast over Wi-Fi is enabled. Valid values:

  • true: enables broadcast.
  • False: disables broadcast.
Note Only after you enable broadcast, terminals that support wireless connections can search the Wi-Fi network by its SSID and receive Wi-Fi signals.
Channel String No Automatic

The Wi-Fi channel.

Valid values: 0 to 11.

Bandwidth String No Automatic

The bandwidth of the channel. Valid values:

  • Automatic
  • 20 MHz
  • 40 MHz
IsAuth String No True

Specifies whether wireless security is enabled. Valid values:

  • true: enables wireless security.
  • False: disables wireless security.
AuthenticationType String No WPA2-PSK

The authentication type. Valid values:

  • NONE
  • WPA-PSK
  • WPA2-PSK
EncryptAlgorithm String No AUTO

The encryption algorithm. Valid values:

  • AUTO: automatically selects the encryption algorithm.
  • TKIP: uses the Temporal Key Integrity Protocol (TKIP).
  • AES: uses the Advanced Encryption Standard authorized by Wi-Fi®.
Password String No 12345678

The password used to connect to the Wi-Fi network.

The password must be 8 to 32 characters in length, and can contain digits and letters.

Response parameters

Parameter Type Example Description
RequestId String 1120228A-E5E1-4E9C-B56D-96887E1A2B2F

The ID of the request.

Examples

Sample requests

http(s)://smartag.cn-shanghai.aliyuncs.com/? Action=ModifySagWifi
&IsEnable=True
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&SSID=aliyun_sag_123456***
&<Common request parameters>

Sample success responses

XML format

<ModifySagWifiResponse>
     <RequestId>1120228A-E5E1-4E9C-B56D-96887E1A2B2F</RequestId>
</ModifySagWifiResponse>

JSON format

{
"RequestId": "1120228A-E5E1-4E9C-B56D-96887E1A2B2F"
}

Error codes

HttpCode Error code Error message Description
400 InvalidId.SMARTAG The specified smart access gateway instance ID does not exist. The error message returned because the specified SAG instance ID does not exist.

For a list of error codes, visit the API Error Center.