---
name: "getLightRhythmsCityInfo"
mode: "api"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getLightRhythmsCityInfo

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

> 💡 This API is a cloud capability and requires authorization before use. For details on cloud capabilities, see the [documentation](/cn/miniapp/common/desc/tech-stack/api). Currently, cloud capabilities are not available in the Developer Tools environment; you must package the app or debug on a real device.

### Description

Retrieve city information for the specified location.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `CommonLonLatParams` | Yes | Request parameters: bizId (business ID), bizType (business type: 0 = device, 1 = group), lon (longitude), lat (latitude). |

### Return Value

Type: `Promise<GetLightRhythmsCityInfoResult>`

Includes country, province, and city.

##### GetLightRhythmsCityInfoResult

| Property | Type | Description |
| --- | --- | --- |
| `country` | `string` | Country |
| `province` | `string` | Province |
| `city` | `string` | City |

### Referenced Types

##### `interface` CommonLonLatParams

| Property | Type | Description |
| --- | --- | --- |
| `bizId` | `string` | Business ID |
| `bizType` | `0 \| 1` | Business type |
| `lon` | `string` | Longitude |
| `lat` | `string` | Latitude |


### Examples

#### Request example

```typescript
import { getLightRhythmsCityInfo } from '@tuya-miniapp/cloud-api';

getLightRhythmsCityInfo({
  bizId: 'vdevo167504******003',
  bizType: 0,
  lon: '112.233',
  lat: '30.233',
})
  .then((response) => {
    console.log(response);
  })
  .catch();
```

#### Response example

```json
{
  "country": "China",
  "city": "Yiyang City",
  "province": "Hunan Province"
}
```


### FAQ

#### Why does the biological rhythm cloud capability call fail?

[Biological rhythm](https://developer.tuya.com/en/docs/iot/geographic_biorhythm?id=Kbn3r2z592at4) must have advanced capabilities enabled on the Tuya Developer Platform product feature definition page. Otherwise cloud capability calls will fail.
