- 2 minutes to read
- Print
- DarkLight
- PDF
POST | Create related user
- 2 minutes to read
- Print
- DarkLight
- PDF
Create a related user in senhasegura.
Prerequisites
- Authorization with access permission to the Users resource granted by the administrator in A2A.
More information in How to manage authorizations in A2A
Request
POST
/api/user/related
Request parameters
Send the parameters below in the body of the request.
username
- string - required - User identification name previously registered in senhasegura.name
- string - required - Name assigned to the related user being created.
Example request
POST
{{url}}/api/user/related
{
"username": "dleite",
"name": "deboraleite"
}
Response
HTTP/1.1 200 OK
{
"code": 200,
"response": {
"status": 200,
"message": "Related user successfully registered!",
"error": false,
"error_code": 0,
"detail": "",
"Message": "Related user successfully registered!",
"erro": false,
"cod_erro": 0
},
"relatedUsers": {
"id": "3",
"name": "deboraleite",
"username": "dleite"
}
}
Errors
400 - Bad Request.
Message: "1001: Parameter 'username' was not informed!"
Possible cause: the required parameter username
wasn’t informed.
username
and resend the request.Message: "1001: Parameter 'name' was not informed!"
Possible cause: the required parameter name
wasn’t informed.
name
and resend the request.Message: "1005: User does not exist"
Possible cause: the username
provided hasn’t returned any user.
username
and resend the request.404 - Not Found.
Message: "Resource sub not found"
Possible cause: the URL or requested resource isn’t correct.
500 - Internal Server Error.
Message: "Unexpected error."
Possible cause: the error is in the senhasegura server.
Message: "You are not authorized to access this resource."
Possible cause: you don’t have the authorization to access this resource.
Client authentication failed.
Message: "Client authentication failed."
Possible cause: failure in your application authentication with the senhasegura server.
Access Token URL
, Client ID
and Client secret
and request a new access token.Invalid signature.
Message: "Invalid signature"
Possible cause: failure in recognizing the URL of the client application.
No route matched with those values.
Message: "No route matched with those values."
Possible cause: the authorization header is missing in the API request.
Request timed out.
Message: "Request timed out."
Possible cause: the request time has expired.