Fix: GET USER example: method casing + response shape - #247
Open
ARZF wants to merge 1 commit into
Open
Conversation
The GET USER example under "گام چهارم: استفاده از توکن" showed the request method as `POST` (should be `GET`). Tested live against the real API with a valid access token (scope: USER_PHONE USER_ID offline_access): GET https://open-api.divar.ir/v1/open-platform/users → 200 OK { "phone_numbers": ["09990000000"], "phone_number": "09990000000", "user_id": "awoDdf1ecd2wac" } `POST` to this endpoint is rejected at the access-control layer before token validation even runs ("RBAC: access denied"), while `GET` correctly reaches token validation. This confirms `GET` is the correct method. This commit fixes: - `POST` → `GET`
✅ Deploy Preview for earnest-gaufre-a3fd01 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's wrong
The GET USER example under "🔮 گام چهارم: استفاده از توکن" shows the request
method as
POST, but the correct method isGET.Evidence
Tested live against the real API with a valid access token
(scope: USER_PHONE USER_ID offline_access):
GET https://open-api.divar.ir/v1/open-platform/users
→ 200 OK
{
"phone_numbers": ["09990000000"],
"phone_number": "09990000000",
"user_id": "awoDdf1ecd2wac"
}
GETreaches token validation and returns the expected data.POSTto the same endpoint is rejected at the access-control layer,before token validation even runs (
"RBAC: access denied").This confirms
GETis the correct method, consistent withdocs/oauth/get_user.md, which already documents this same endpoint asGET.Change
POST→GET