etsy

UserApi

All URIs are relative to https://openapi.etsy.com

Method HTTP request Description
getMe GET /v3/application/users/me  
getUser GET /v3/application/users/{user_id}  

getMe

Self getMe()

<div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><span class=\"wt-badge wt-badge–notificationPrimary wt-bg-slime-tint wt-mr-xs-2\">General Release</span><a class=\"wt-text-link\" href=\"https://github.com/etsy/open-api/discussions\" target=\"_blank\" rel=\"noopener noreferrer\">Report bug</a></div><div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><p class=\"wt-text-body-01 banner-text\">This endpoint is ready for production use.</p></div> Returns basic info for the user making the request.

Example

// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*

val apiInstance = UserApi()
try {
    val result : Self = apiInstance.getMe()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling UserApi#getMe")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling UserApi#getMe")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

Self

Authorization

Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”

HTTP request headers

getUser

User getUser(userId)

<div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><span class=\"wt-badge wt-badge–notificationPrimary wt-bg-slime-tint wt-mr-xs-2\">General Release</span><a class=\"wt-text-link\" href=\"https://github.com/etsy/open-api/discussions\" target=\"_blank\" rel=\"noopener noreferrer\">Report bug</a></div><div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><p class=\"wt-text-body-01 banner-text\">This endpoint is ready for production use.</p></div> Retrieves a user profile based on a unique user ID. Access is limited to profiles of the authenticated user or linked buyers. For the primary_email field, specific app-based permissions are required and granted case-by-case.

Example

// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*

val apiInstance = UserApi()
val userId : kotlin.Long = 789 // kotlin.Long | 
try {
    val result : User = apiInstance.getUser(userId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling UserApi#getUser")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling UserApi#getUser")
    e.printStackTrace()
}

Parameters

| Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | userId | kotlin.Long| | |

Return type

User

Authorization

Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”

HTTP request headers