2 endpoints
Authentication
Manage API keys and tokens
POST
Create an access token
/auth/tokenExchange your API key for a short-lived access token.
Request Body
application/json
api_keystringrequiredYour API key from the dashboard
Example: "ps_live_abc123def456"
expires_innumberToken TTL in seconds (default 3600)
Example: 7200
Code Examples
curl -X POST "https://api.pipesolar.com/v1/auth/token" \
-H "Authorization: Bearer ps_live_..." \
-H "Content-Type: application/json" \
-d '{
"api_key": "ps_live_abc123def456",
"expires_in": 7200
}'Response
Example Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 7200
}Playground
POST
/auth/tokenTry itPOST
Revoke an access token
/auth/revokeInvalidate an existing access token immediately.
Request Body
application/json
tokenstringrequiredThe access token to revoke
Code Examples
curl -X POST "https://api.pipesolar.com/v1/auth/revoke" \
-H "Authorization: Bearer ps_live_..." \
-H "Content-Type: application/json" \
-d '{
"token": "example"
}'Response
Example Response
{
"revoked": true
}Playground
POST
/auth/revokeTry it