# Web Cloud › Internet › Access › Modem › WiFi API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/internet/access/modem/wifi.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/internet/access/modem/wifi.json?format=openapi3

## Operations

- `GET /xdsl/{serviceName}/modem/wifi` — List the WLANs of the modem
- `GET /xdsl/{serviceName}/modem/wifi/{wifiName}` — Get a WLAN of the modem
- `PUT /xdsl/{serviceName}/modem/wifi/{wifiName}` — Update a WLAN of the modem
- `GET /xdsl/{serviceName}/modem/wifi/{wifiName}/qrCode` — Get the WiFi QR code of the modem
- `GET /xdsl/{serviceName}/modem/availableWLANChannel` — List the WiFi channels of the modem

## List the WLANs of the modem

`GET /1.0/xdsl/{serviceName}/modem/wifi`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/#get-xdsl-servicename-modem-wifi

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/wifi/get`

Returns the names of the WiFi networks of the modem of the access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/wifi" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/xdsl/{serviceName}/modem/wifi")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/xdsl/{serviceName}/modem/wifi");

print_r($result);
?>
```

## Get a WLAN of the modem

`GET /1.0/xdsl/{serviceName}/modem/wifi/{wifiName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/#get-xdsl-servicename-modem-wifi-wifiname

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/wifi/get`

Returns the SSID, state, visibility, frequency, channel, security type and key of a WiFi network, and whether it is a guest network.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `wifiName` | path | string | yes | Wifi name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.WLAN | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SSID` | string |  | Service Set Identifier of the WLAN interface |
| `SSIDAdvertisementEnabled` | boolean |  | Hide or show the Wifi |
| `bandSteering` | boolean | read-only | Indicate if frequencies 2.4GHz and 5GHz are agregated |
| `channel` | integer |  | Choice of a channel (When chosen, channelMode is set to Manual) |
| `channelMode` | xdsl.xdslModemConfig.ChannelModeEnum |  | How the WiFi channel is selected — one of `Auto`, `Manual` |
| `enabled` | boolean |  | Wifi state |
| `frequency` | xdsl.xdslModemConfig.FrequencyEnum | read-only | Frequency (2.4GHz \| 5GHz) — one of `2.4GHz`, `5GHz` |
| `guest` | boolean | read-only | Indicate if it is normal access wifi or guest wifi |
| `securityKey` | string |  | WiFi security key |
| `securityType` | xdsl.xdslModemConfig.SecurityTypeEnum |  | Type of WLAN security protection — one of `None`, `WEP`, `WPA`, `WPA2`, `WPA2andWPA3`, `WPA3`, `WPAandWPA2` |
| `taskId` | integer | read-only | ID of the ongoing todo (NULL if none) |
| `wifiName` | string | read-only | Name of the Wifi |

```json
{
  "SSID": "string",
  "SSIDAdvertisementEnabled": true,
  "bandSteering": true,
  "channel": 0,
  "channelMode": "Auto",
  "enabled": true,
  "frequency": "2.4GHz",
  "guest": true,
  "securityKey": "string",
  "securityType": "None",
  "taskId": 0,
  "wifiName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/wifi/{wifiName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/xdsl/{serviceName}/modem/wifi/{wifiName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/xdsl/{serviceName}/modem/wifi/{wifiName}");

print_r($result);
?>
```

## Update a WLAN of the modem

`PUT /1.0/xdsl/{serviceName}/modem/wifi/{wifiName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/#put-xdsl-servicename-modem-wifi-wifiname

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/wifi/edit`

Changes the SSID, state, visibility, channel, channel mode, security type or security key of a WiFi network.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `wifiName` | path | string | yes | Wifi name |

### Request body (required)

Type: `xdsl.WLAN`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SSID` | string |  | Service Set Identifier of the WLAN interface |
| `SSIDAdvertisementEnabled` | boolean |  | Hide or show the Wifi |
| `bandSteering` | boolean | read-only | Indicate if frequencies 2.4GHz and 5GHz are agregated |
| `channel` | integer |  | Choice of a channel (When chosen, channelMode is set to Manual) |
| `channelMode` | xdsl.xdslModemConfig.ChannelModeEnum |  | How the WiFi channel is selected — one of `Auto`, `Manual` |
| `enabled` | boolean |  | Wifi state |
| `frequency` | xdsl.xdslModemConfig.FrequencyEnum | read-only | Frequency (2.4GHz \| 5GHz) — one of `2.4GHz`, `5GHz` |
| `guest` | boolean | read-only | Indicate if it is normal access wifi or guest wifi |
| `securityKey` | string |  | WiFi security key |
| `securityType` | xdsl.xdslModemConfig.SecurityTypeEnum |  | Type of WLAN security protection — one of `None`, `WEP`, `WPA`, `WPA2`, `WPA2andWPA3`, `WPA3`, `WPAandWPA2` |
| `taskId` | integer | read-only | ID of the ongoing todo (NULL if none) |
| `wifiName` | string | read-only | Name of the Wifi |

```json
{
  "SSID": "string",
  "SSIDAdvertisementEnabled": true,
  "channel": 0,
  "channelMode": "Auto",
  "enabled": true,
  "securityKey": "string",
  "securityType": "None"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/wifi/{wifiName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: xdsl.WLAN
result = client.put("/xdsl/{serviceName}/modem/wifi/{wifiName}",
	SSID = None, # Service Set Identifier of the WLAN interface (type: string)
	SSIDAdvertisementEnabled = None, # Hide or show the Wifi (type: boolean)
	channel = None, # Choice of a channel (When chosen, channelMode is set to Manual) (type: integer)
	channelMode = None, # How the WiFi channel is selected (type: xdsl.xdslModemConfig.ChannelModeEnum)
	enabled = None, # Wifi state (type: boolean)
	securityKey = None, # WiFi security key (type: string)
	securityType = None, # Type of WLAN security protection (type: xdsl.xdslModemConfig.SecurityTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: xdsl.WLAN
$result = $ovh->put("/xdsl/{serviceName}/modem/wifi/{wifiName}", array(
	SSID => null, // Service Set Identifier of the WLAN interface (type: string)
	SSIDAdvertisementEnabled => null, // Hide or show the Wifi (type: boolean)
	channel => null, // Choice of a channel (When chosen, channelMode is set to Manual) (type: integer)
	channelMode => null, // How the WiFi channel is selected (type: xdsl.xdslModemConfig.ChannelModeEnum)
	enabled => null, // Wifi state (type: boolean)
	securityKey => null, // WiFi security key (type: string)
	securityType => null, // Type of WLAN security protection (type: xdsl.xdslModemConfig.SecurityTypeEnum)
));

print_r($result);
?>
```

## Get the WiFi QR code of the modem

`GET /1.0/xdsl/{serviceName}/modem/wifi/{wifiName}/qrCode`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/#get-xdsl-servicename-modem-wifi-wifiname-qrcode

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/wifi/qrCode/get`

Returns, as a base64 image, the QR code to connect to the WiFi network of the modem, when the modem supports it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `wifiName` | path | string | yes | Wifi name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/wifi/{wifiName}/qrCode" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/xdsl/{serviceName}/modem/wifi/{wifiName}/qrCode")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/xdsl/{serviceName}/modem/wifi/{wifiName}/qrCode");

print_r($result);
?>
```

## List the WiFi channels of the modem

`GET /1.0/xdsl/{serviceName}/modem/availableWLANChannel`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/wifi/#get-xdsl-servicename-modem-availablewlanchannel

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/availableWLANChannel/get`

Returns the WiFi channels the modem of the access can use on the 2.4GHz or 5GHz frequency.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frequency` | query | xdsl.WLANFrequencyEnum | yes | WLAN frequency you want to retrieve channels — one of `2.4GHz`, `5GHz` |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/availableWLANChannel" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/xdsl/{serviceName}/modem/availableWLANChannel")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/xdsl/{serviceName}/modem/availableWLANChannel");

print_r($result);
?>
```
