-
Notifications
You must be signed in to change notification settings - Fork 5
GetUser
Walter Lara edited this page Jul 16, 2024
·
11 revisions
Allows to get an User.
URLs:
/v1/users/me
/v1/users/{userId}
Method: GET
Path Parameters:
Parameter | Type | Description |
---|---|---|
userId | string | UUID of the User to retrieve. |
Query Parameters: None
Headers:
Accept: application/json
Authorization: Bearer {accessToken}
Code: 200 OK
Headers:
Content-Type: application/json
Content:
Field | Type | Description | Condition |
---|---|---|---|
id | string | UUID of the User. | Always |
createdAt | string | Date and time when the User was created (ISO-8601 format). | Always |
oauthType | string | OAuth type. | Only if requester is the same as target User, and logged in via OAuth. |
oauthId | string | OAuth Identifier. | Only if requester is the same as target User, and logged in via OAuth. |
firstName | string | User first name. | Only if available |
lastName | string | User last name. | Only if available |
nickname | string | User nickname. | Only if available |
pictureUrl | string | Valid URL of picture image file. | Only if available |
bannerUrl | string | Valid URL of banner image file. | Only if available |
websiteUrl | string | Valid URL of User personal website. | Only if available |
twitterUrl | string | Valid URL of User Twitter account. | Only if available |
instagramUrl | string | Valid URL of User Instagram account. | Only if available |
spotifyProfile | string | Spotify artist profile URI. E.g. spotify:artist:xyz for artist link https://open.spotify.com/artist/xyz include. |
Only if available |
soundCloudProfile | string | SoundCloud artist profile permalink. E,g. xyz for artist link https://soundcloud.com/xyz . |
Only if available |
appleMusicProfile | string | Apple Music artist profile ID. E,g. xyz for artist link https://music.apple.com/abcd/efg/xyz . |
Only if available |
location | string | User location. | Only if available |
role | string | User role. | Only if available |
genre | string | User genre. | Only if available |
biography | string | User biography. | Only if available |
walletAddress | string | User wallet address. | Only if requester is the same as target User |
string | Valid email address. | Only if requester is the same as target User | |
companyName | string | Company name. | Only if available |
companyLogoUrl | string | Valid URL of company logo image. | Only if available |
companyIpRights | boolean | Indicates if the IP rights belong to the company. | Only if available |
dspPlanSubscribed | boolean | Indicates if subscribed to the DSP pricing plan. | Always |
Content example:
{
"id": "7bd2862f-8deb-4814-8943-156d9dab80dd",
"createdAt": "2022-04-22T20:47:55.738918",
"oauthType": "Facebook",
"oauthId": "10234453819462801",
"firstName": "John",
"lastName": "Doe",
"nickname": "Johnny"
"pictureUrl": "https://somewebsite/john-doe.png",
"role": "Producer",
"genre": "Pop",
"biography": "John is a leading Pop Music Producer",
"walletAddress": "addr123456789123456789",
"email": "[email protected]",
"dspPlanSubscribed": false
}
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.
Code: 404 NOT FOUND
Condition: If the specified User is not found.
Headers:
Content-Type: application/json
Content example:
{
"code": 404,
"description": "Not Found",
"cause": "Entity UserEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}
Code: 422 UNPROCESSABLE ENTITY
Condition: If {userId}
is malformed.
Headers:
Content-Type: application/json
Content example:
{
"code": 422,
"description": "Unprocessable Entity",
"cause": "Invalid UUID string: 123456789"
}