PDGA REST API Authentication
Note: The PDGA Developer Program is currently closed. We are not accepting new applications for the PDGA Developer Program at this time. We do anticipate opening up the program again in the future once development of an updated version of the API is complete.
Base URL: https://api.pdga.com
Login
Creates a new session for a given user and returns the session info.
- Endpoint: /services/json/user/login
- Method: POST
Headers
- Content-Type: application/json
Data
-
{"username”:”your username", "password”:”your password"}
Request
curl -X "POST" "https://api.pdga.com/services/json/user/login" \
-H 'Content-Type: application/json' \
-d $'{
"username": "your username",
"password": "your password"
}'
Response
{
"sessid": "gulgLuoc523YfpbjJbndX_92P0yCzqZk4KUS3CaKcKA",
"session_name": "SSESS5e82fe1021255ea27b492eabfde3b279",
"token": "t5_30vxMOS4eKsRrUGYNf1PRNaBCizd3gND_754aGc0",
"user": {
...
}
}
Connect
Returns status for the current session.
- Endpoint: /services/json/system/connect
- Method: POST
Headers
- X-CSRF-Token: token
- Cookie: session_name=sessid
Request
curl -X "POST" "https://api.pdga.com/services/json/system/connect" \ -H 'X-CSRF-Token:
token' \ -H 'Cookie: session_name=sessid'
Response
{ "sessid": "gulgLuoc523YfpbjJbndX_92P0yCzqZk4KUS3CaKcKA", "session_name": "SSESS5e82fe1021255ea27b492eabfde3b279", "user": { "name": "
your username
", "mail": "
your email address
", "login": "
1605891349", "status": "1" } }
Logout
Destroys the session for the currently logged in user.
- Endpoint: /services/json/user/login
- Method: POST
Headers
- X-CSRF-Token: token
- Cookie: session_name=sessid
Request
curl -X "POST" "https://api.pdga.com/services/json/user/logout" \
-H 'X-CSRF-Token: token' \
-H 'Cookie: session_name=sessid'
Response
[true]
Developer Program
- Overview
- REST API
- Authentication
- Services
- Player
- Event
- Course