API Authentication
All requests to the PingoLine REST API must be authenticated using a Bearer Token in the Authorization header.
Generating an API Key
- Log in to your PingoLine Portal.
- Navigate to Developers -> API Keys.
- Click Generate New API Key.
- Copy your token (tokens start with
pk_...or are secure alphanumeric hashes).
Passing the Token
Include the token in your HTTP headers:
http
Authorization: Bearer YOUR_API_TOKEN_HERE
Accept: application/json
Content-Type: application/jsonExample cURL Request
bash
curl -X GET "https://pingoline.com/api/v1/ping" \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
-H "Accept: application/json"Example Successful Response
json
{
"data": {
"account": "Your Business Name",
"site": {
"name": "My Online Store",
"webhook_url": "https://mystore.com/api/webhooks/pingoline"
},
"ping": "pong"
}
}Scopes & Permissions
Each API token can be granted specific capabilities:
| Scope | Description |
|---|---|
read | Retrieve order call records, check wallet balance, view CDR logs |
write | Dispatch order confirmation calls, send SMS, originate click-to-call |
