Repository navigation
Authentication Design: Query Parameters vs Request Body, and id_token vs access_token — Which approach is recommended? #130
Unanswered
Xinjie-Lan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi ERCOT team,
I've been integrating with the Public API and have a few questions about the authentication design documented in the Registration and Authentication guide.
Observation 1: Credentials in query parameters vs. request body
The documentation specifies passing username and password as query parameters when requesting a token, e.g.:
POST /auth/token?username=xxx&password=yyy
However, I found that passing these credentials in the request body as form/JSON payload also works and returns a valid token response.
A few questions on this:
Is the query parameter approach intentional by design, or is it a legacy/convenience pattern?
Sending credentials in query parameters is generally considered a security risk since URLs (including query strings) can be logged in server access logs, browser history, proxy logs, and CDN/WAF infrastructure — even over HTTPS. Is there a specific reason this pattern was chosen here?
Is the request body approach officially supported and safe to rely on, or is it incidental behavior that may break in future?
Observation 2: id_token vs access_token
The documentation instructs using the id_token from the token response for subsequent API calls. However, I noticed the token response also includes an access_token, and I've found that using the access_token directly also works for authenticating API requests.
Questions here:
What is the intended difference between id_token and access_token in this context?
Is using access_token for API calls officially supported, or is it coincidentally working due to how the auth server is configured?
Is there a recommended token to use going forward for stability and correctness?
Summary of what I'd like clarified:
id_tokenfor API callsaccess_tokenfor API callsAny guidance on the recommended, stable, and secure approach would be greatly appreciated. Thank you!
All reactions