GraphQL Endpoint
POST
unifieduserprofile
Submits GraphQL queries to the User Profile service and returns JSON responses with the requested data. For legacy endpoint support, see API Basics.
Resource Information
| Method and URI | |
| Authentication Context | User context is Mandatory |
| Available OAuth Scopes | Depends on the fields needed. Most requests only need profapi:core-std-profile:read to fetch standard profile fields. See Custom Scopes for all available scopes and field-level access details. |
| Data Format | JSON |
| Rate Limit | 500 calls per minute. For more information, see User Profile Rate Limits. |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow. |
| Content-Type* string | Must always be application/json. |
| x-correlation-id string | A unique identifier for the request. This can be any string value that you choose. It is used for matching requests and responses in case of errors. |
* Required
Response
HTTP Status Code Summary
| 200 OK | Information about the currently logged in user was successfully returned. |
| 400 Bad Request | The server was unable to process the request. The syntax of the request may be malformed or may be missing a required parameter. Do not repeat the request without fixing the issue. The response body may indicate what is wrong with the request. |
| 401 Unauthorized | The access token is invalid. It may have either expired or is not valid for the requested operation. Please verify the token and retry the request. |
| 429 Too Many Requests | Rate limit exceeded; wait some time before retrying. |
| 403 Forbidden | The request was successfully validated but lacked required permission. Please verify your credentials and permissions and retry the request. |
| 500 Internal Server Error | An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. |
Response
Body Structure (200)
| query object | Contains the GraphQL query or mutation to send to the User Profile service |
| variables object | Contains key-value pairs for GraphQL variables. Keys correspond to variable names defined in your query. Values represent the actual values for those variables. |
Example
This example demonstrates successful retrieval of a user profile.
Request
curl --location 'https://api.aps.autodesk.com/unifieduserprofile' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"query": "query GetUserProfile($filter: UserProfileInput!) {
userProfile(filter: $filter) {
userId
profileImages {
isImagePresent
userThumbnails {
sizeX120
}
}
personalInfo {
aboutMe
primaryEmail
language
countryCode
ldapInfo {
isLdapEnabled
}
basicInfo {
firstName
lastName
screenName
}
webLinks {
linkedInProfile
blog
website
}
contactInfo {
phones {
phoneType
countryCode
number
extension
}
address {
addressLine1
addressLine2
city
stateProvince
postalCode
country
}
alternateEmail
}
professionalInfo {
jobTitle
industry
industryCode
company {
companyName
}
}
}
}
}",
"variables": {
"filter": {
"id": "<USER_ID>"
}
}
}'
Show More
const axios = require('axios');
// Construct the GraphQL request body
const data = JSON.stringify({
// GraphQL query to fetch user profile information
query: `query GetUserProfile($filter: UserProfileInput!) {
userProfile(filter: $filter) {
userId
profileImages {
isImagePresent
userThumbnails {
sizeX120
}
}
personalInfo {
aboutMe
primaryEmail
language
countryCode
ldapInfo {
isLdapEnabled
}
basicInfo {
firstName
lastName
screenName
}
webLinks {
linkedInProfile
blog
website
}
contactInfo {
phones {
phoneType
countryCode
number
extension
}
address {
addressLine1
addressLine2
city
stateProvince
postalCode
country
}
alternateEmail
}
professionalInfo {
jobTitle
industry
industryCode
company {
companyName
}
}
}
}
}`,
// Query variables - replace <USER_ID> with the actual user ID
variables: {
filter: {
id: '<USER_ID>'
}
}
});
// Configure the Axios request
const config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.aps.autodesk.com/unifieduserprofile',
headers: {
// Replace <ACCESS_TOKEN> with your OAuth 2.0 access token
'Authorization': 'Bearer <ACCESS_TOKEN>',
'Content-Type': 'application/json'
},
data: data
};
// Execute the request and handle the response
axios.request(config)
.then((response) => {
// Successfully retrieved user profile data
console.log(JSON.stringify(response.data));
})
.catch((error) => {
// Handle any errors that occurred during the request
console.log(error);
});
Show More
// Set request timeouts (0 = no timeout)
Unirest.setTimeouts(0, 0);
// Build the GraphQL query as a JSON string
String requestBody = "{"
+ "\"query\": \"query GetUserProfile($filter: UserProfileInput!) { "
+ "userProfile(filter: $filter) { "
+ "userId "
+ "profileImages { isImagePresent userThumbnails { sizeX120 } } "
+ "personalInfo { "
+ "aboutMe primaryEmail language countryCode "
+ "ldapInfo { isLdapEnabled } "
+ "basicInfo { firstName lastName screenName } "
+ "webLinks { linkedInProfile blog website } "
+ "contactInfo { "
+ "phones { phoneType countryCode number extension } "
+ "address { addressLine1 addressLine2 city stateProvince postalCode country } "
+ "alternateEmail } "
+ "professionalInfo { jobTitle industry industryCode company { companyName } } "
+ "} } }\", "
+ "\"variables\": { \"filter\": { \"id\": \"<USER_ID>\" } }"
+ "}";
// Execute the POST request to the GraphQL endpoint
HttpResponse<String> response = Unirest
.post("https://api.aps.autodesk.com/unifieduserprofile")
// Replace <ACCESS_TOKEN> with your OAuth 2.0 access token
.header("Authorization", "Bearer <ACCESS_TOKEN>")
.header("Content-Type", "application/json")
.body(requestBody)
.asString();
Show More
Response
{
"data": {
"userProfile": {
"userId": "<USER_ID>",
"profileImages": {
"isImagePresent": true,
"userThumbnails": {
"sizeX120": "https://images.profile.autodesk.com/<hash>/x120.jpg?t=<generated-token>"
}
},
"personalInfo": {
"aboutMe": "",
"primaryEmail": "test@test.com",
"language": "en",
"countryCode": "US",
"ldapInfo": {
"isLdapEnabled": true
},
"basicInfo": {
"firstName": "First",
"lastName": "Last",
"screenName": ""
},
"webLinks": {
"linkedInProfile": "",
"blog": "autodesk.com",
"website": ""
},
"contactInfo": {
"phones": [
{
"phoneType": "Mobile",
"countryCode": "1",
"number": "4153700000",
"extension": ""
}
],
"address": {
"addressLine1": "1 Market St",
"addressLine2": "",
"city": "San Francisco",
"stateProvince": "California",
"postalCode": "94105",
"country": "US"
},
"alternateEmail": ""
},
"professionalInfo": {
"jobTitle": "",
"industry": "",
"industryCode": "",
"company": {
"companyName": ""
}
}
}
}
}
}
Show More