> For the complete documentation index, see [llms.txt](https://docs.9proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.9proxy.com/developers/sdk/sdk-native-c/functions/getconfigjson.md).

# GetConfigJSON

Retrieve the configuration of a specific port as a JSON string.

```c
char* GetConfigJSON(unsigned int port)
```

***

## Parameters

* **port** – Port number to query.

## Return Value

* char\* – JSON string with the port’s configuration (must be freed with FreeBuf).

JSON Structure Example

```json
// JSON Structure

{
  "proxy_id": "677e2c4517f247bc89dd66a4",
  "plan": "1",
  "country_code": "HK",
  "address": "127.0.0.1:60000",
  "binding_type": "ip",
  "Index": 60000,
  "client_country_code": "US",
  "is_online": true,
  "city": "Honkong",
  "public_ip": "1.2.3.4",
  "origin_id": "677e2c4537f244bc29dd66a2",
  "server_id": "6775221517f231bc29df2624",
  "last_refresh": 1692705600,
  "count_refresh": 12,
  "prepare_start_date": 1692600000,
  "manual": false,
  "action_type": 1,
  "streams": 5,
  "bw": {
    	  "id": "677e1c4517f227a229de67c5",
  "bw_up": 2048000,
  "bw_down": 10485760,
  "session_time": 3600,
  "bytes_write": 5242880,
  "bytes_read": 7340032
  }
}

```

## Example

```c
// example

char* j = GetConfigJSON(10001); if (j){ puts(j); FreeBuf(j);}

```
