Hello. I recently customized the authentication endpoint on the back end of odoo to return the users group via a group key returned in the JSON response ,but now when I am log in in Via postman the group key is in the response but if I am too login via flutter mobile app, it doesn't show the group key in the response . I am wondering what could be the cause? Thabkyou
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účetnictví
- Sklad
- PoS
- Projekty
- MRP
This question has been flagged
Hi,
Since the group key appears correctly when you log in via Postman, the Odoo backend is working as expected and the issue is almost certainly on the Flutter side. In most cases, this happens because the Flutter app is parsing the response into a Dart model that does not include the new group_key field, or it is only reading a nested part of the JSON (for example, result) where the field is not being accessed. As a result, the value is silently dropped even though it exists in the raw response. It can also occur if the app is using cached or outdated code due to hot reload, or if a response wrapper/interceptor strips unknown fields. Printing the raw response body in Flutter and updating the model or parsing logic to explicitly include group_key will resolve the issue.
Hope it helps
Hello Elijah,
This behavior is actually expected and is related to how authentication responses are handled on different clients, not an issue with your backend logic itself.
In Odoo, when you customize the authentication endpoint (for example /web/session/authenticate) to return additional data such as a user group key, the response structure depends on how the request is made and how the client parses the response.
Postman
Shows the raw JSON response exactly as returned by Odoo.
You can see all custom keys added in the response.
Flutter mobile app
Most Flutter Odoo integrations (or HTTP clients) deserialize only specific fields from the response.
If your Flutter code or authentication service is mapping the response to a model (e.g. Session, User, etc.), any extra/custom keys are ignored unless explicitly handled.
In some cases, the app may only read result or session_id and discard the rest.
Flutter model does not include the custom field
The group_key exists in the JSON, but your Dart model does not map it.
Response parsing is limited
The login logic may only extract a subset of the response (e.g. user ID, token).
Different endpoint usage
Postman may be calling /web/session/authenticate
Flutter may be using another endpoint or a wrapper that does not expose custom response fields.
Verify that the exact same endpoint is being called from Flutter.
Log and inspect the raw response body in Flutter before parsing.
Update your Dart model / response parser to explicitly read and store the group_key.
If using a third-party Odoo Flutter SDK, check whether it supports custom response fields.
From the Odoo side, no additional changes are required if the key is already visible in Postman — the backend is working correctly.
If you need help reviewing the backend customization or aligning it with a mobile-friendly API response, CandidRoot would be happy to assist.
If you found this explanation helpful, kindly upvote this answer.

CandidRoot Solutions Pvt. Ltd.
Email: info@candidroot.com
Web: https://www.candidroot.com
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit se| Related Posts | Odpovědi | Zobrazení | Aktivita | |
|---|---|---|---|---|
|
|
2
úno 25
|
1616 | ||
|
|
1
led 25
|
1453 | ||
|
|
0
bře 25
|
1437 | ||
|
|
0
lis 24
|
29 | ||
|
|
1
pro 25
|
3683 |