Skip to content

[Bug Report: API Field Missing] #205

Description

@Fahad-Habib

🐛 Describe the Bug

If the user does not exist in the system, we are getting 401 Unauthorized and same is the case for Invalid JWT, I believe there should be a proper status code (404) in case of non-existent Users. Also, I have noticed that if I try to access the details of a user that was deleted, the response of the API is different and if the user ID never existed in the CRM, the response is different.

📍 API Endpoint

https://services.leadconnectorhq.com/users/:userId

✅ Expected Behavior

I believe there should be a proper status code (404) in case of non-existent Users.

💻 Screenshots or Code Samples

{
    "message": "The user does not exist.",
    "error": "Unauthorized",
    "statusCode": 401
}

Product Area

users

📋 Use Case

I need to handle different cases when making GHL request and in case of token expiry I need to refresh token and for that I am using 401 status, but if the multiple cases can return 401 status that will cause integrity issues in our system.

🚨 Why Should This Be Prioritized?

It's blocking our integration of User related webhooks, since the webhook does not provide the user_type and only provides user_role, I need to call the GHL API to fetch the user details on every webhook that we receive.

🧠 Additional Context

No response

Metadata

Metadata

Labels

bug-missing-api-fieldSomething isn't working in the Highlevel API or fields are missing in the API Endpoints.processedusers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions