Skip to content

Fix: GET USER example: method casing + response shape - #247

Open
ARZF wants to merge 1 commit into
divar-ir:masterfrom
ARZF:fix/get-user-http-method
Open

Fix: GET USER example: method casing + response shape#247
ARZF wants to merge 1 commit into
divar-ir:masterfrom
ARZF:fix/get-user-http-method

Conversation

@ARZF

@ARZF ARZF commented Jul 20, 2026

Copy link
Copy Markdown

What's wrong

The GET USER example under "🔮 گام چهارم: استفاده از توکن" shows the request
method as POST, but the correct method is GET.

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"
}

  • GET reaches token validation and returns the expected data.
  • POST to the same endpoint is rejected at the access-control layer,
    before token validation even runs ("RBAC: access denied").

This confirms GET is the correct method, consistent with
docs/oauth/get_user.md, which already documents this same endpoint as GET.

Change

  • POSTGET

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`
@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for earnest-gaufre-a3fd01 ready!

Name Link
🔨 Latest commit 3317b2d
🔍 Latest deploy log https://app.netlify.com/projects/earnest-gaufre-a3fd01/deploys/6a5de77ea8325e00080ea24a
😎 Deploy Preview https://deploy-preview-247--earnest-gaufre-a3fd01.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant