Handle API errors
Every third-party API error carries an HTTP status, a string code, and a message. Match on the code, and retry only what's safe to retry.
This page covers the endpoints under /api/thirdparty: the access token, communities, groups, members, moderators, and video posts. Each endpoint's reference lists the errors it returns. This page explains the shape they share and what to do about each one.
The error response
An error has an HTTP status in the 4xx range and a JSON body with three fields.
{
"code": "5218",
"message": "The community you are looking for is no longer available.",
"data": {}
}| Field | Type | Description |
|---|---|---|
| code | string | Genuin's error code, such as "5218". It identifies the cause more precisely than the HTTP status, and it's the value to match on. |
| message | string | A sentence for logs and support tickets. Some messages carry a literal XXXX- prefix, such as XXXX-[Invalid Use of API]. |
| data | object | Usually {}. A few errors put details here: data.err_msg lists rejected link-out URLs, and data.video_id names the video a duplicate upload matched. |
A successful call uses the same three fields with code set to the number 200, so a client can read every response the same way. On errors the code is a string; on success it's a number.
Validation errors
Each endpoint checks the body against its schema before doing anything. How it reports a failure differs by endpoint.
| Endpoint | HTTP status | What comes back |
|---|---|---|
| Generate an access token | 412 | code 5166 when a field is missing or isn't a string; 5272 with data.err_msg when the body isn't valid JSON. |
| Create a community | 400 | No code or message. data.message names the failing fields, such as handle, type. |
| Create a group, Post a video, Update a group | 400 | {"data": {}} and nothing else. The failing field isn't reported. |
| Add members, Add moderators | 412 | code 5166. |
For the three endpoints that return an empty body, compare your request with the endpoint's Parameters table. The usual causes are a value of the wrong type, such as a number where a string is expected, a value outside its allowed set, and a missing required field.
Authentication errors
Every endpoint except the token endpoint reads the bearer token from the Authorization header before anything else. Three errors come from that check.
| HTTP status | code | Cause | Fix |
|---|---|---|---|
| 401 Unauthorized | 1003 | The header is missing, the token has expired, or the account behind it is no longer active. Message: authentication is required. | Request a new token with Generate an access token and send it as Authorization: Bearer <token>. |
| 401 Unauthorized | 5033 | The token wasn't issued by the token endpoint, such as a device token from an app session. Message: Invalid or tempered token. | Use a token from POST /api/thirdparty/auth. |
| 404 Not Found | 5235 | The brand the token belongs to isn't active. Message: Brand not exists. | Contact the Genuin team. |
Error codes
Codes are shared across endpoints. This table lists every code the third-party endpoints return, grouped by HTTP status.
| HTTP status | code | Meaning | Returned by |
|---|---|---|---|
| 400 | 1099 | The server failed while handling a valid request. Message: An unexpected error occurred processing the request | Any endpoint |
| 401 | 1003 | Missing, expired, or revoked token. Message: authentication is required. | Any endpoint that takes a token |
| 401 | 5033 | Token not issued by the token endpoint. Message: Invalid or tempered token. | Any endpoint that takes a token |
| 401 | 5159 | The account can't make this call: it isn't a member of the community, isn't the group's owner or an admin, or sent a brand_id it isn't a user of. Message: Invalid Use of API | Create a community, Create a group, Update a group |
| 403 | 5230 | A community or group setting excludes the account, such as who can create groups or who can post. Message: XXXX-[Access Denied]. | Create a group, Post a video |
| 403 | 5243 | The community or group belongs to a brand outside your network. Message: XXXX-[given user's brand_id is being conflicted with asked content's brand_id]. | Create a group, Post a video |
| 404 | 5044 | No group with that chat_id, or it's deleted or flagged. Message: Can't find group. It may have been deleted by you or the other person in the group. | Post a video, Update a group |
| 404 | 5218 | No community with that id, or it's deleted. Message: The community you are looking for is no longer available. | Add members, Add moderators |
| 404 | 5235 | No active brand matches the credentials or the token. Message: Brand not exists. | Generate an access token, any endpoint that takes a token |
| 404 | 5025 | The brand's owner account is inactive. Message: The user you are looking for is no longer available. | Generate an access token |
| 409 | 5057 | The video_name or message_id was posted before. Message: You have already replied to this video. | Post a video |
| 409 | 5156 | The opening video's video_name was posted before; data.video_id names the earlier post. Message: You have already published this video | Create a group |
| 409 | 5167 | A group with the same share string exists. Message: XXXX-[You have already published this group] | Create a group |
| 409 | 5216 | The handle is taken. Message: XXXX-[community handle already exists.] | Create a community |
| 409 | 5217 | The profile image file name is used by another community. Message: XXXX-[community dp already exists.] | Create a community |
| 412 | 5166 | The request breaks a rule: wrong action ids, a missing field, many users to many communities, a link-out URL outside your allowed domains, or an account without the required role. Message: XXXX-[Invalid Use of API] | Generate an access token, Create a community, Create a group, Post a video, Add members, Add moderators |
| 412 | 5174 | The signed-URL request used a content type outside video, image, audio, and text. Message: Pre Condition failed | Upload step of Post a video |
| 412 | 5227 | The community already has a welcome group. Message: XXXX-[welcome group already exists] | Create a group |
| 412 | 5272 | The body isn't valid JSON; data.err_msg explains. Message: Pass payload is invalid. please read err_msg for more details | Generate an access token |
| 422 | 5023 | The server couldn't sign an upload URL. Message: Could not fetch credentials. | Upload step of Post a video |
| 422 | 5059 | The post couldn't be saved. Message: Error in sending reply. | Post a video |
| 422 | 5158 | The update couldn't be applied. Message: Could not update the group. | Update a group |
What to retry
| HTTP status | Retry | Why |
|---|---|---|
| 400 with code 1099, and 422 | Once, after a short wait | The request was valid and the server failed. A second attempt usually succeeds. |
| 400 from validation, 401, 403, 404, 412 | No | The request itself is the problem. Fix it before sending it again. |
| 409 | No | The record already exists. Treat it as success when the earlier call was yours. |
Treat a 422 or a 1099 on a write as indeterminate: the change may have been saved. Retrying is still safe on these endpoints, because the duplicate checks turn a second save into a 409.
- A repeated Post a video to a group with the same
video_nameormessage_idreturns409with code5057. That tells you the first call succeeded. - A repeated Create a community with the same
handlereturns409with code5216. - A repeated Update a group and its members is harmless. Fields already at the new value come back with
falsein their_updatedflag, and members already in the group aren't added twice.
Pass your own message_id on Post a video, and keep the same handle on Create a community. A repeated call is then rejected as a duplicate instead of creating a second record. The third-party endpoints have no rate limit, so a retry only needs to wait for the server-side failure to clear; a second or two is enough.
When you contact the Genuin team about an error, include the HTTP status, the code, the message, the endpoint, and the request time in UTC. A 1099 can only be traced from the server side, and the timestamp is how it's found.
Limitations
- Codes aren't unique across the platform:
5243also names an unrelated server error elsewhere. On the third-party endpoints it always means the brand mismatch above. - Three endpoints report no validation detail: Create a group, Post a video, and Update a group return
400with an empty body. - Messages are English only, and some carry the literal
XXXX-prefix. Map codes to your own text rather than showing messages to members.

