User API
This API allows your service to request a user's information and disconnects the service from the user.
Basic information
Base URL
Server Phase |
URL | 비고 |
---|---|---|
QA (DEV) |
https://{region}-qa-ext.lgthinq.com |
region
|
OP |
https://{region}-ext.lgthinq.com |
API List
Method | Summary |
---|---|
GET /users |
Get a user information (userNumber) |
DELETE /user/service |
Disconnect a service and delete the user's information and device lists |
Get a user's information
GET /users
Description
This API is for getting a user's information (user number)
GET {Base_URL}/users
Parameter
Header Parameters
Common Header
Body Parameters
None
Example of Request
[GET] {{ENDPOINT_URL}}/users ## Header { "Authorization": "Bearer 3b565aa79ac4abaa37809a8b8b745499bd05bb3ef0ed75fe350ad2c696b4b956bddfa35e76c26a12ab33c643bed579dd", "x-country-code": "KR", "x-message-id": "0123456789012345678912", "x-service-id": "470ae4c534ba143cad86e5c3", "x-service-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlSWQiOiI0NzBhZTRjNTM0YmExNDNjYWQ4NmU1YzMiLCJ0b2tlblNlZWQiOiI1Zjc2MWQwMDU2YmE4NWJkIiwidGltZSI6MTUxNjM0MTkzMn0.aznAEnUItCWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI", "content-type": "application/json" }
Result
There are two results (Succeeded, Failed) for this method call.
Succeeded
If succeeded, the user number is returned in the following format.
Example of Response
{ "messageId": "yerPFvgSQZOeZuVO7Onnpw", "timestamp": "2023-12-27T05:28:17.739840", "response": { "userNumber": "SaGvM4ETAgOHSAFhezzi" } }
Failed
If failed, it returns error codes and error messages defined in the Common Response.
Example of Response
{ "messageId": "yerPFvgSQZOeZuVO7Onnpw", "timestamp": "2023-12-27T05:28:17.739840", "error": { "message": "Not registered user", "code": "1202" } }
Disconnect a service
DELETE /user/service
Description
This API allows your service to deactivate a user and disconnect a user from your service.
DELETE {Base_URL}/user/service
You can call this API when the user wants to disconnect service and delete the information of devices.
Parameter
Header Parameters
Common Header
Body Parameters
None
Result
There are two results (Succeeded, Failed) for this method call.
Succeeded
If succeeded, it returns HTTP 200 OK response Code.
Example of Request
[DELETE] {{ENDPOINT_URL}}/user/service ## Header { "Authorization": "Bearer 3b565aa79ac4abaa37809a8b8b745499bd05bb3ef0ed75fe350ad2c696b4b956bddfa35e76c26a12ab33c643bed579dd", "x-country-code": "KR", "x-message-id": "0123456789012345678912", "x-service-id": "470ae4c534ba143cad86e5c3", "x-service-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlSWQiOiI0NzBhZTRjNTM0YmExNDNjYWQ4NmU1YzMiLCJ0b2tlblNlZWQiOiI1Zjc2MWQwMDU2YmE4NWJkIiwidGltZSI6MTUxNjM0MTkzMn0.aznAEnUItCWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI", "content-type": "application/json" }
Example of Response
{ "messageId": "kZo3GvwMTsSYGpqHgaz8RA", "timestamp": "2023-12-20T06:29:10.344852", "response": {} }
Failed
If failed, it returns error codes and error messages defined in the Common Response.