Skip to main content

Uniphore Customer Portal

Sync Logged-In User

The API requests platform to sync the logged-in user with the access token. The platform service query the user group information from Auth0 and map the user to a Uniphore role, based on the configuration.

Endpoint

Method: POST

URL: https://api.us.cloud.uniphore.com/ocms/v2/configuration/sync-user?environment=dev

Request
curl -X POST "https://api.us.cloud.uniphorestaging.com/ocms/v2/configuration/sync-user?environment=dev" -H "accept: application/json" -H "Authorization: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkxYejBQYWVFRERuS3dfcjdkU2s2UyJ9.eyJodHRwczovL2FwaS51bmlwaG9yZS5jb20vZW1haWxfaWQiOiJhcGl0ZXN0aW5nLXVhc3Npc3RhZG1pbnNfMTAwMUB1YXNzaXN0cWE1YS5jb20iLCJodHRwczovL2FwaS51bmlwaG9yZS5jb20vYXV0aDBfbmFtZSI6IkFQSVRlc3RpbmctdWFzc2lzdEFkbWluc18xMDAxIiwiaHR0cHM6Ly9hcGkudW5pcGhvcmUuY29tL3VzZXJfaWQiOiJhdXRoMHw2NDkwMGRmMGI0YTQ2ZWIxZDljNzUwMmIiLCJodHRwczovL2FwaS51bmlwaG9yZS5jb20vcm9sZXMiOlsiaW50ZXJhY3RfaW50ZXJhY3Rpb25fYWRtaW4iLCJpbnRlcmFjdF9hY2NvdW50X2FkbWluIiwidV9hZG1pbmlzdHJhdG9yIl0sImh0dHBzOi8vYXBpLnVuaXBob3JlLmNvbS91c2VyX21ldGFkYXRhIjp7ImNsaWVudF9pZCI6IkFQSVRlc3RpbmctdWFzc2lzdEFkbWluc18xMDAxQHVhc3Npc3RxYTVhLmNvbSJ9LCJodHRwczovL2FwaS51bmlwaG9yZS5jb20vdGVuYW50IjoiYzVkNDViZDUtYzQyNi00ZDhjLTg0MTYtZTIxMjE1ZTE3Y2RmIiwiaXNzIjoiaHR0cHM6Ly9kZXYtZzJqNW11MnoudXMuYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDY0OTAwZGYwYjRhNDZlYjFkOWM3NTAyYiIsImF1ZCI6WyJ1YXNzaXN0LnVuaXBob3JlLmNvbSIsImh0dHBzOi8vZGV2LWcyajVtdTJ6LnVzLmF1dGgwLmNvbS91c2VyaW5mbyJdLCJpYXQiOjE2ODk1ODUzMDMsImV4cCI6MTY4OTY3MTcwMywiYXpwIjoiRGpjcHhvSWRkRGZ1ZkhGZFFONUJuNGlYNjNaeEFrdWYiLCJzY29wZSI6Im9wZW5pZCIsIm9yZ19pZCI6Im9yZ19lcEc3U2g0c3htY0VPUUFGIiwicGVybWlzc2lvbnMiOltdfQ.aMwPMhvjz8mtzK_s4LjdY9NjqkKMeEpHOvvggnALJmEdp3fzT5qWChp71SLjY7PJUMjM9keRJSZ9rOJFQ4kdLsHq5rOnCZ_C2tgC1z43HC7e_ZkqaAt43mouQyaiPXQcvNsVh4Xq-pKNgWapw7RMqkx3kYLrYJGOrLOx-aMht1K9CsGhrZlDexdrdjiLSS6h--uBHRle_yWJ_J_47tkA2pwEMUFOTUEgUD0fcs2_ykyQU15uiSfUKp5lfp1V_q_Mb8GpQOohZs-23q29Px899aURtfn0qnsLO2qUGvkc1vc4q7WAC9J4Rg4uo5XrRbk1PXcTdBz650ht0_veX33Y9g" -d ""
Header Parameters

Parameters Name

Description

Values

Example

Authorization

Access token should be sent with all client requests. The access token helps the platform services to get the user group information from Auth0.

You can pass platform access token which is generated from Auth0.

String

Bearer <token>

Query Parameter

Parameter Name

Description

Data Type

Required / Optional

environment

Operating environment type. Three out-of-the-box environments are provided for each account:

  • DEV

  • TEST

  • PROD

String

Optional

Example Response
{
    "user": {
        "id": 4882,
        "username": "johnny.kingston",
        "first-name": "Johnny",
        "last-name": "Kingston",
        "display-name": "Johnny Kingston",
        "status": "Active",
        "client-id": "2e37fa2c-959b-4326-babb-083a80df92bf",
        "email": "johnny.kingston@grr.la",
        "role-id": 9,
        "role-name": "Quality Analyst",
        "profile-id": 5,
        "tenant-id": 1,
        "sync-to-tableau": false,
        "creation-date": 1616485650042,
        "modification-date": 1616495840191 ,
        "org-id": 52,
        "org-name": "221 org"
    }
}
Response and Error Codes

Code

Description

200

Ok - The request has succeeded.

401

Unauthorized user

404

User not found

Example: user not found with username johnny.kingston1

500

Internal Server Error

If the Agent has a static station-id, then the above response will contain the station-id key-value pair.

If the Agent’s station-id is dynamic, then the above response will not contain the key station-id.