PowerSchool API Postman Collection, feel free to copy to fork it
Overview
This collection provides a complete, production-ready setup for working with PowerSchool APIs. It implements automatic OAuth authentication with token validation, eliminating manual token management and enabling seamless multi-environment workflows.
Key Features
๐ Automatic Authentication
- Zero Manual Token Management: Tokens are obtained and validated automatically before every request
- Smart Token Validation: Validates tokens against the PowerSchool metadata endpoint (
/ws/v1/metadata) - Auto-Refresh on Expiry: Automatically refreshes expired or invalid tokens
- Bearer Token Headers: All requests automatically include properly formatted
Authorization: Bearer {{psAuthToken}}headers
๐ Multi-Environment Support
- Different PowerSchool Instances: Easily switch between multiple PowerSchool servers (Development, Staging, Production)
- Credential Isolation: Each environment has its own
psURL,psClientID, andpsClientSecret - Shared Token Storage:
psAuthTokenstored at collection level, shared across all environments - One-Click Switching: Select different environments from Postman dropdown
โ Token Validation
- Metadata Endpoint Check: Validates token by calling
/ws/v1/metadata - Plugin ID Detection: Confirms token validity by checking for
plugin_idin response - Automatic Recovery: If token is invalid, automatically obtains a new one
- Error Prevention: Detects authentication issues before they cause request failures
๐ Complete Request Examples
- PowerSchool OAuth Request: Direct OAuth endpoint for manual token retrieval
- Get Metadata (with token): Example of authenticated request
- Get Metadata (without token): Shows public metadata access
- Get Students By District: Production-ready example with auto-auth
How It Works
Request Flow
When you click Send on any request:
1. Collection Pre-request Script Runs
โ
2. Check: Does psAuthToken exist?
โโ NO โ Obtain new token via OAuth
โโ YES โ Validate token via /ws/v1/metadata
โ โโ Valid (has plugin_id) โ Proceed
โ โโ Invalid (no plugin_id) โ Get new token
โ
3. Token stored in psAuthToken (collection variable)
โ
4. Request executes with Authorization: Bearer {{psAuthToken}}
โ
5. Response received
Token Validation Logic
Valid Token Response:
{
"metadata": {
"plugin_id": 15334,
"powerschool_version": "25.7.0.1.252121950",
...
}
}
Invalid Token Response:
{
"metadata": {
"district_timezone": "Asia/Riyadh",
...
(NO plugin_id field)
}
}
The script detects missing plugin_id and automatically refreshes the token.
Setup Instructions
1. Create Environments
For each PowerSchool instance, create an environment with:
| Variable | Value |
|---|---|
psURL | https://your-powerschool-domain.com |
psClientID | Your OAuth client ID |
psClientSecret | Your OAuth client secret |
2. Collection Variables
The collection already includes:
psAuthToken– Auto-populated by OAuth script (do not edit)
3. Select Environment
Before making requests, select your environment from the Postman dropdown (top-right).
4. Make Requests
Click Send on any request. The collection pre-request script handles all authentication automatically.
Collection Structure
PowerSchool API Postman Collection
โโโ Authentication (Collection-level Pre-request Script)
โ โโโ Token validation against /ws/v1/metadata
โ โโโ Auto-refresh on expiry
โ โโโ Error handling
โ
โโโ PowerSchool OAuth Request (POST)
โ โโโ Direct OAuth endpoint access
โ โโโ Manual token retrieval (for testing)
โ
โโโ Get Metadata (with token) (GET)
โ โโโ Authenticated metadata endpoint
โ โโโ Shows valid token usage
โ
โโโ Get Metadata (without token) (GET)
โ โโโ Public metadata access
โ โโโ Shows response without authentication
โ
โโโ Get Students By District (GET)
โโโ Example authenticated API request
โโโ Returns district student data
Variables Reference
Collection Variables
psAuthToken– OAuth access token (auto-populated, do NOT manually edit)
Environment Variables (Set per PowerSchool instance)
psURL– PowerSchool domain (e.g.,https://ps.asb.bh)psClientID– OAuth client ID from PowerSchool adminpsClientSecret– OAuth client secret from PowerSchool admin
Console Logging
The collection provides detailed console logging for debugging:
Successful Token Validation:
โ Validating existing token...
โ Token is valid. Plugin ID: 15334
โ Auth token already set, proceeding...
Token Refresh:
โ Validating existing token...
โ Token is invalid. No plugin_id in metadata response
โ Token is invalid, getting new one...
โ Getting new authentication token...
โ New token obtained successfully
Missing Credentials:
โ Missing required variables: psURL, psClientID, or psClientSecret
Open Postman Console (bottom-left) to view all logs.
Common Use Cases
Adding New PowerSchool API Endpoints
- Click “+” to add new request to collection
- Set method and URL:
{{psURL}}/ws/v1/[endpoint] - Add headers:
Authorization: Bearer {{psAuthToken}}Accept: application/json
- Click Save
The collection pre-request script automatically handles authentication for all new requests.
Switching Between PowerSchool Instances
- Open Postman
- Click environment dropdown (top-right)
- Select desired environment
- Make request – collection script uses selected environment’s credentials
Manual OAuth Testing
- Click PowerSchool OAuth Request
- Verify environment is selected
- Click Send
- Token is extracted and stored in
psAuthToken - Check console for success/error messages
Validating Token Status
- Click Get Metadata (with token)
- Click Send
- Response shows current metadata with or without
plugin_id - If
plugin_idis present, token is valid - If
plugin_idis missing, token will auto-refresh on next request
Error Handling
“Missing required variables”
Cause: Environment variables not set
Solution: Add psURL, psClientID, psClientSecret to selected environment
“OAuth request failed with status 401”
Cause: Incorrect credentials Solution: Verify OAuth client ID and secret in PowerSchool admin portal
“Token is invalid. No plugin_id in metadata response”
Cause: Token lacks required permissions or is expired Solution: Token auto-refreshes automatically on next request
“Authorization header empty”
Cause: Token didn’t load before request executed Solution: Wait a moment and retry, or manually run OAuth request first
Best Practices
Security
- โ Never commit real credentials to version control
- โ Use Postman environments to store sensitive data
- โ Treat
psClientSecretlike a password - โ Rotate OAuth credentials periodically
Organization
- โ Use meaningful request names
- โ Group related endpoints in folders
- โ Document expected responses in request descriptions
- โ Keep collection pre-request script clean and updated
Maintenance
- โ Test collection monthly with all environments
- โ Monitor PowerSchool API changes
- โ Update endpoints as PowerSchool APIs evolve
- โ Keep OAuth credentials current
API Endpoints Included
| Endpoint | Method | Purpose |
|---|---|---|
/oauth/access_token | POST | OAuth token retrieval |
/ws/v1/metadata | GET | System metadata (with & without token) |
/ws/v1/district | GET | District information |
Next Steps
- Create Environments: Add your PowerSchool instances as separate environments
- Set Credentials: Configure
psURL,psClientID,psClientSecretper environment - Test Collection: Run requests and verify token validation in console
- Extend Collection: Add more endpoints as needed using the same patterns
Support & Troubleshooting
Check Console Logs
Open Postman Console (bottom of screen) to see detailed execution logs including:
- Token validation results
- OAuth request status
- Variable resolution
- Error messages
Validate Token Manually
- Run Get Metadata (with token)
- Look for
"plugin_id"in response - If present: Token is valid โ
- If missing: Token needs refresh (auto-handled)
Test OAuth Endpoint
- Run PowerSchool OAuth Request
- Check console for:
โ Set psAuthToken as [token]– Successโ OAuth failed...– Check credentials
FAQ
Q: Do I need to manually get a token? A: No. The collection automatically manages tokens. Manual OAuth request is only for testing.
Q: Can I use this with multiple PowerSchool instances? A: Yes. Create separate environments for each instance and switch between them.
Q: What happens if my token expires? A: The collection automatically detects expiry and refreshes the token before the next request.
Q: Where is my token stored?
A: In the collection variable psAuthToken. It persists across environment switches.
Q: Can I see what the script is doing? A: Yes. Open Postman Console (Ctrl+Alt+C or Cmd+Option+C) to view detailed logs.
Q: How often do tokens refresh? A: Only when they expire or are invalid. Valid tokens are reused across requests.
Author: Prince PARK
Version: 1.0
Last Updated: March 26, 2026
Created For: PowerSchool API Integration
Requires: Postman 10.0+