Description
This method will give you all logged user info in json format. No access_token or other tokens are needed, so is mandatory that user is logged in DruID. You have to call this method if you want to get user logged info in a javascript or other client side programming language
Endpoint URL:
GET https://graph.{your-domain.com}/activityid/public/v1/user/me
Request headers
Parameter | Description | Required |
---|---|---|
From | entrypoint id | true |
From-Origin | App id | true |
Query string parameters
Parameter | Description | Type | Required | Default value |
---|
Response examples
Response: user logged
Parameter | Description | Type |
---|---|---|
content | Data receive with the response | struct |
content.user | Data of the user logged with the request. More info about user struct at User Info | struct |
content.session_info | session info structure | struct |
content.session_info.access_token | access token value | string |
content.session_info.token_type | token type | ‘bearer’ |
content.session_info.expires_in | the remaining lifetime in seconds of the access token | long |
content.session_info.expires_at | epoch time in milliseconds when the token will expire. If you use unix tools to convert time you must discard last 3 digits | long |
content.session_info.refresh_token | Refresh token value. You must use if youre are following “oauth2 refresh token flow”. You can ignore this value in rest of cases | string |
content.session_info.login_status | oauth2 server login status of logged user | struct |
content.session_info.login_status.uid | DRUID of the logged user.It will have the same value of content.user.id | long |
content.session_info.login_status.connect_state | oauth2 server connect state | ‘connected’ | ‘notConnected’ | ‘unknown’ |
content.session_info.scope | scope for which the token was created | string |
result.status | http status code | integer |
Response: user logged, but need to complete data
Parameter | Description | Type |
---|---|---|
content | Data receive with the response | struct |
content.user | Data of the user logged with the request. More info about user struct at User Info | struct |
content.session_info | session info structure | struct |
content.session_info.access_token | access token value | string |
content.session_info.token_type | token type | ‘bearer’ |
content.session_info.expires_in | the remaining lifetime in seconds of the access token | long |
content.session_info.expires_at | epoch time in milliseconds when the token will expire. If you use unix tools to convert time you must discard last 3 digits | long |
content.session_info.refresh_token | Refresh token value. You must use if youre are following “oauth2 refresh token flow”. You can ignore this value in rest of cases | string |
content.session_info.login_status | oauth2 server login status of logged user | struct |
content.session_info.login_status.uid | DRUID of the logged user.It will have the same value of content.user.id | long |
content.session_info.login_status.connect_state | oauth2 server connect state | ‘connected’ | ‘notConnected’ | ‘unknown’ |
content.session_info.scope | scope for which the token was created | string |
result.status | http status code | integer |
result.elapsed | Time spent to receive the response | integer |
errors | Response errors | struct |
errors.message | Errors message | string |
errors.details | Errors detail | string |
Response codes
Code | Type | Description |
---|---|---|
400 | Error | Bad Request: The request could not be understood by the server due to malformed syntax |
401 | Error | Unauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc) |
403 | Error | Forbidden: user id or password are invalid |
412 | Error | Precondition failed: User can not log because he/she has not confirmed email |
451 | Error | Unavailable For Legal Reasons: user must accept new terms and conditions |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
504 | Error | Gateway TimeoutService can not contact with oauth server to do some internal operations |
200 | Success | User logged successfully. You will get ‘user logged JSON response’ |
206 | Success | Partial content: User logged successfullybut needs some data to be completed |