# Obtain an access token
TOKEN=$(
curl -sS -X POST "https://api.waycore.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=connections:read accounts:read transactions:read" \
| python -c 'import sys, json; print(json.load(sys.stdin)["access_token"])'
)
# Call the API (example: list connections, it should an empty list)
curl -sS "https://api.waycore.com/v1/connections?limit=10" \
-H "Authorization: Bearer $TOKEN"