User Translations API
Get translations preference of a specific user
NOTE:
user_id
in api path doesn't matter, system will authenticate usingauth headers
and send translation preferences of authenticated user.
Path Parameters
user id
Query Parameters
Client API token
Header Parameters
user access token
client access token
timestamp of token expiry
access token type
user uid
- 200
- 401
- 500
OK
Response Headers
Schema
- Array [
- ]
translations object[]
{
"success": true,
"translations": [
{
"id": 0,
"name": "string",
"created_at": "string",
"updated_at": "string",
"language_id": 0,
"default": true
}
]
}
{
"success": true,
"translations": [
{
"id": 0,
"name": "Urdu",
"created_at": "2021-11-16T17:52:31.000Z",
"updated_at": "2021-11-16T17:52:31.000Z",
"language_id": 5,
"default": true
}
]
}
{
"success": true,
"translations": [
{
"id": 1,
"name": "Arabic",
"created_at": "2016-11-19T19:58:34.000Z",
"updated_at": "2017-02-07T11:07:17.000Z",
"language_id": 1,
"default": true
},
{
"id": 5,
"name": "Saheeh International",
"created_at": "2017-02-07T08:42:38.000Z",
"updated_at": "2017-02-07T09:13:01.000Z",
"language_id": 2,
"default": true
}
]
}
Unauthorized response, api will respond with this 401 eithr user is not logged in or do not have permission to perform some action. Like creating a post in a room, but user is not member of room.
System will also return 401 if api token is missing or invlaid.
Schema
Default value: 401
Default value: false
{
"errors": [
"string"
],
"status": 401,
"success": false
}
{
"errors": [
"You need to sign in or sign up before continuing."
],
"success": false
}
{
"message": "You don't have permission!",
"status": 401,
"success": false
}
Internal server error, api will respond with 500 if something went wrong processing the request.
Schema
Default value: false
Default value: internal server error
error message
{
"success": false,
"message": "internal server error"
}