Return User Information API

Implement the logic associated with the steps 9 and 10 in "Figure OAuth 2.0 based SSO between LINE WORKS and the customer" and the steps 7 and 8 in "Figure OAuth 2.0 based API authentication", and provide it as an API to LINE WORKS. After verifying the access token, the customer SSO system returns user information.

Note

  • The user information returned by the customer SSO system must be the same as the member's externalKey in Member External Key Mapping under Organization Sync in the Developer Console.

Request URL {#user-info-request-url}

https://CustomerDomain/UserInfo

You can only use port 80 or 443 according to LINE WORKS's infrastructure security policy.
Register the request URL in User info return API under SSO > WORKS as SP in the Developer Console.

Figure Add OAuth 2.0 based User info return API

HTTP method {#user-info-request-method}

POST

Request {#user-info-request-body}

Note

  • During API communication, the connection timeout is 1 second and the read timeout is 3 seconds.
ParameterTypeRequiredDescription
client_idStringYThe client ID registered in the Developer Console
client_secretStringYThe client secret registered in the Developer Console
access_tokenStringYAccess token

Response {#user-info-response-body}

The response is formatted as JSON.

PropertyTypeRequiredDescription
user_idStringY (if successful)Member ID.
Logged-in user’s user key (External Key or LINE WORKS Account)
errorStringY (if it fails)An error code returned on failure
error_descriptionStringY (if it fails)An error description returned on failure

Error codes {#user-info-response-error-code}

CodeMessageDescription
101access_deniedRequest from unauthorized client
201invalid_requestMissing or invalid request
301unauthorized_clientInvalid client ID or secret
303invalid_accessAccess token verification failed