Skip to content

Me API V3

Use Me API to retrieve details about the currently authenticated Sprinklr user. Developers can use this endpoint to identify the user associated with an access token and retrieve user, customer, and workspace information.

The endpoint requires no request parameters or request body. Authentication determines which user's information is returned.

Overview

OperationMethodPath
Fetch current userGET/api/v3/me

There is no request body, no query parameter, and no path parameter. The access token itself is the input.

The operation is part of User API V3, which also provides operations for retrieving and managing other users.


Base URL

https://api3.sprinklr.com/{env}/api/v3/me

Replace {env} with your assigned Sprinklr environment. See APIs | Sprinklr Developer Portal for the published environment list.

For the production environment at app.sprinklr.com, omit the {env} segment from the URL.

Credentials are environment-scoped. An API key and token generated for one environment return 401 against another, even when the request is otherwise perfect. Because /me is the endpoint you will use to test credentials, this is worth stating plainly: a 401 from /me very often means "right credentials, wrong environment" rather than "bad credentials."


Authentication

Me API V3 requires bearer-token and API-key authentication. The V3 API reference specifies both bearerAuth and apiKeyAuth for this operation. See API Overview for portal registration, API key and secret generation, and the Authorization flow.

Include the following headers:

This is a GET with no request body, so there is no Content-Type header.

HeaderValuePurpose
AuthorizationBearer {{accessToken}}Credential used by the API to authenticate a user with the server
Key{{apiKey}}API key that authenticates the application with the server. See API Key and Secret Generation
Acceptapplication/jsonDetermines the acceptable response type from the server

A Content-Type header is not required because the GET request does not contain a request body.


Fetch the current user

Use the following operation to retrieve information about the authenticated user:

GET /api/v3/me

The operation does not require query parameters, path parameters, or a request body.

Example request

curl -X GET \
  'https://api3.sprinklr.com/{env}/api/v3/me' \
  -H 'Authorization: Bearer {{accessToken}}' \
  -H 'Key: {{apiKey}}' \
  -H 'Accept: application/json'

Response

The response provides information about the authenticated user, including the user's identifier, name, email address, user type, customer, workspace, and configured properties.

V3 returns data as an array containing the user object:

{
  "data": [
    {
      "id": 60000000,
      "type": "PARTNER_ADMIN",
      "name": "Jane Doe",
      "email": "jane.doe@example.com",
      "properties": {
        "spr_user_availability_status": ["Connection Issue"],
        "support_access": ["true"],
        "_c_00000000000000000000000a": ["Morning Shift"]
      },
      "customerId": 60000000,
      "workspaceId": 60000002
    }
  ],
  "errors": []
}

The properties map is abridged here. A real response contains many more entries.

Response fields

FieldTypeDescription
idIntegerNumeric user ID of the authenticated user
typeStringUser type — see The type field
nameStringDisplay name of the user
emailStringEmail address of the user
propertiesObjectMap of custom-field keys to arrays of string values — see The properties map
customerIdIntegerIdentifier of the customer/partner the user belongs to
workspaceIdIntegerIdentifier of the user's workspace
errorsArraySibling of data. Empty on success

These fields are also represented in Sprinklr's authenticated-user example.

The structure returned by /me differs from the broader /user resource. GET /api/v3/user returns the richer user schema used to retrieve another user by ID or email.


Status codes

HTTP statusDescription
200 OKAuthenticated user returned
400 Bad RequestMalformed request. Unusual here — there is nothing to malform but headers
401 UnauthorizedInvalid, missing, or expired Authorization token or Key header, or credentials from a different environment
403 ForbiddenCredentials valid but not permitted
404 Not FoundWrong path or wrong {env} segment

The error object

FieldTypeDescription
idStringError identifier
codeIntegerNumeric error code
messageStringError key, for example account.not.found

Error responses return data as null.


Migrating from V2

To migrate from Me API V2 to V3, update the version in the endpoint:

For V2, - GET https://api3.sprinklr.com/{env}/api/v2/me
For V3, + GET https://api3.sprinklr.com/{env}/api/v3/me

Common Use Cases

Verify credentials before anything else

curl -s -o /dev/null -w '%{http_code}\n' \
  'https://api3.sprinklr.com/{env}/api/v3/me' \
  -H 'Authorization: Bearer {{accessToken}}' \
  -H 'Key: {{apiKey}}' \
  -H 'Accept: application/json'

200 means the token, the API key, and the environment all agree. Anything else means the problem is your credentials, not the endpoint you were originally calling.

Discover the workspace at startup

me = current_user(requests.get(url, headers=headers).json())
WORKSPACE_ID = me["workspaceId"]
CUSTOMER_ID  = me["customerId"]
USER_ID      = me["id"]

Cache these for the process lifetime rather than calling /me per request.

Gate administrative features on user type

if me["type"] in ("PARTNER_ADMIN", "CLIENT_ADMIN"):
    enable_admin_features()
else:
    enable_standard_features()   # default branch handles unknown types

Read a custom property safely

def prop(me, key, default=None):
    values = me.get("properties", {}).get(key)
    if not values:
        return default
    return values[0]              # always an array of strings

status = prop(me, "spr_user_availability_status")