As of now, programmatic access to Pinggy tunnel information and management through APIs is only available for enterprise users. You can compare our plans here.
Pinggy provides an HTTP API, which is similar to REST APIs. In order to access the APIs you need to use a token called API Key
.
Using this key, an API request is a simple HTTP request. You can access the APIs using CURL as follows:
curl --location 'https://dashboard.pinggy.io/backend/api/v1/session/active' \
--header 'Authorization: Bearer {API Key}'
Example response:
[
{
"id": "9345b393-d916-4a2e-816a-3347468a03c0",
"userId": 4490909,
"tokenId": 392084,
"token": null,
"tokenName": null,
"virtualToken": "sJsufpgMMl-10003",
"virtualTokenName": null,
"subdomain": "mytest.v.awesomeapp.a.pinggy.link",
"customdomain": null,
"mode": "tcp",
"modeUdp": "",
"port": 10003,
"creationTimestamp": "2024-08-23T04:04:36.083+00:00",
"lastUpdateTimestamp": "2024-08-23T04:04:37.780+00:00"
}
]
You can manage your API keys from https://dashboard.pinggy.io/api-keys.
You can now find the newly generated key in the list of API keys.
List all active tunnels associated with your account.
Request:
curl --location 'https://dashboard.pinggy.io/backend/api/v1/session/active' \
--header 'Authorization: Bearer {API Key}'
Example response:
[
{
"id": "9345b393-d916-4a2e-816a-3347468a03c0",
"userId": 4490909,
"tokenId": 392084,
"token": null,
"tokenName": null,
"virtualToken": "sJsufpgMMl-10003",
"virtualTokenName": null,
"subdomain": "mytest.v.awesomeapp.a.pinggy.link",
"customdomain": null,
"mode": "tcp",
"modeUdp": "",
"port": 10003,
"creationTimestamp": "2024-08-23T04:04:36.083+00:00",
"lastUpdateTimestamp": "2024-08-23T04:04:37.780+00:00"
}
]