> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Get the authenticated user GET https://api.contentful.com/users/me This endpoint returns details about your Contentful user account. Reference: https://contentful.com/developers/docs/references/content-management-api/users/get-the-authenticated-user ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Response ### 200 OK - Request successful - `map from string to any` ## Examples **Response** ```json { "2faEnabled": true, "activated": true, "avatarUrl": "https://images.ctfassets.net/abcd1234", "confirmed": true, "email": "dwight@dundermifflin.com", "firstName": "Dwight", "lastName": "Schrute", "signInCount": 1, "sys": { "createdAt": "2025-02-23T05:19:48.000Z", "id": "exampleuserid", "type": "User", "updatedAt": "2025-02-23T05:19:48.000Z", "version": 1 } } ``` **SDK Code** ```android Android // Create the Contentful client. final CMAClient client = new CMAClient .Builder() .setAccessToken("") .setSpaceId("") .setEnvironmentId("") .build(); // Fetch User. client .users() .async() .fetchMe( new CMACallback() { @Override protected void onSuccess(CMAUser result) { new AlertDialog.Builder(context) .setTitle("Contentful") .setMessage("Successfully fetched your user information." + "\n\nResult: " + result) .show(); } @Override protected void onFailure(RuntimeException exception) { // An error occurred! Inform the user. new AlertDialog.Builder(context) .setTitle("Contentful Error") .setMessage("Could not fetch your information." + "\n\nReason: " + exception.toString()) .show(); super.onFailure(exception); } } ); ``` ```java Java // Create the Contentful client. final CMAClient client = new CMAClient .Builder() .setAccessToken("") .setSpaceId("") .setEnvironmentId("") .build(); // Fetch Entry. final CMAUser me = client .users() .fetchMe(); ``` ```kotlin Kotlin // Create the Contentful client. val client = CMAClient.Builder() .setAccessToken("") .setSpaceId("") .setEnvironmentId("") .build() // Fetch Entry. val me = client .users() .fetchMe() ``` ```swift Swift We currently don't provide a CMA SDK for this platform. ``` ```js-legacy JavaScript (legacy) import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) client.getCurrentUser() .then((user) => console.log(user.fullName)) .catch(console.error) ``` ```php PHP $client = new \Contentful\Management\Client(''); $user = $client->getUserMe(); ``` ```ruby Ruby require 'contentful/management' client = Contentful::Management::Client.new('') user = client.users.me ``` ```python Python from contentful_management import Client client = Client('') ui_extension = client.users().me() ``` ```.net .NET // This client should only be created once per application. var httpClient = new HttpClient(); var client = new ContentfulManagementClient(httpClient, "", ""); var user = await client.GetCurrentUser(); ``` ```javascript JavaScript No snippet for this SDK. ```