Search for content

Quick Start - Account API

With the Account service you can manage your API keys and track their usage. It is important to note that unlike all other APIs, the Account API needs a master API key for authentication. For more details consult the concept.

Using the Account API is simple. Follow the steps on this page to get started with requesting data. For an easy integration you can also use the clients for Java, C# and TypeScript on GitHub.

Please note the individual rate and request limits for each API. You can find all limits in our FAQ.

 

API Endpoint

To get you started we will use the following endpoint, that will request all API keys of your current subscription.

https://api.myptv.com/account/v1/api-keys

Request

You can test this by entering the URL into your web browser (be sure to replace YOUR_MASTER_API_KEY with your actual master API key).

https://api.myptv.com/account/v1/api-keys?apiKey=YOUR_MASTER_API_KEY

Alternatively you can choose one of the following options to send your request. You also have the option to send the master API key in the request header.

cURL:
curl --location --request GET "https://api.myptv.com/account/v1/api-keys" --header "ApiKey: YOUR_MASTER_API_KEY"

PowerShell:

$headers = @{"apiKey" = "YOUR_MASTER_API_KEY"}
$Uri = "https://api.myptv.com/account/v1/api-keys"
$response = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers
$response | ConvertTo-Json

Response

Below you will find a possible result with the API keys sorted by the date they were created in descending order.

{
	"apiKeys": [
		{
			"apiKey":"e70W62cD5bd95d4faV5afF31H5B2cb6gGe66F2816",
			"description":"My second ApiKey",
			"created": "2024-04-01"
		},
		{
			"apiKey":"F30r62cD5bd95dkL7uG2LfF31H5B2cb6gAj92Mmp0I",
			"description":"My first ApiKey",
			"created": "2024-03-18"
		}
	]
}