You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current
getMe
Endpoint for retrieving data about current user. By default, it uses the getMeBasicProfileDefaultQuery GraphQL query when customer parameter is not passed and the getMeFullProfileDefaultQuery GraphQL query when it's passed
Signature
export declare function getMe(
context: SetupContext,
params?: GetMeParams,
customQuery?: CustomQuery,
responseOptions?: ResponseOptions
): Promise<GetMeResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SetupContext | Automatically injected context. Refer to SetupContext |
params | Optional | GetMeParams | Parameters defining whether user is logged in |
customQuery | Optional | CustomQuery | Custom queries included in the request |
responseOptions | Optional | ResponseOptions |
Returns
User data