Returns the currently authenticated user (the subject of the token).
| query Me { | |
| me { | |
| connectedAccounts { | |
| firstName | |
| id | |
| lastLoginAt | |
| lastName | |
| profilePictureUrl | |
| provider | |
| } | |
| createdAt | |
| emailVerified | |
| firstName | |
| id | |
| lastName | |
| mfaEnabled | |
| mfaLastUsedAt | |
| passwordLastUsedAt | |
| passwordSet | |
| profilePictureUrl | |
| updatedAt | |
| } | |
| } |
| { | |
| "data": { | |
| "me": { | |
| "connectedAccounts": [ | |
| { | |
| "email": "email_example", | |
| "firstName": "firstName_example", | |
| "id": "id_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "lastLoginAt": "2024-01-01T00:00:00.000Z", | |
| "lastName": "lastName_example", | |
| "profilePictureUrl": "profilePictureUrl_example", | |
| "provider": "AppleOAuth" | |
| } | |
| ], | |
| "createdAt": "2024-01-01T00:00:00.000Z", | |
| "email": "email_example", | |
| "emailVerified": true, | |
| "firstName": "firstName_example", | |
| "id": "id_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "lastName": "lastName_example", | |
| "mfaEnabled": true, | |
| "mfaLastUsedAt": "2024-01-01T00:00:00.000Z", | |
| "passwordLastUsedAt": "2024-01-01T00:00:00.000Z", | |
| "passwordSet": true, | |
| "profilePictureUrl": "profilePictureUrl_example", | |
| "updatedAt": "2024-01-01T00:00:00.000Z" | |
| } | |
| } | |
| } |
me
Returns User!
createdAt: DateTime!
email: String!
emailVerified: Boolean!
firstName: String
id: ID!
lastName: String
profilePictureUrl: String
updatedAt: DateTime!
Returns a user by ID, provided they are a member of the token’s organization.
| query User($id: ID!) { | |
| user(id: $id) { | |
| connectedAccounts { | |
| firstName | |
| id | |
| lastLoginAt | |
| lastName | |
| profilePictureUrl | |
| provider | |
| } | |
| createdAt | |
| emailVerified | |
| firstName | |
| id | |
| lastName | |
| mfaEnabled | |
| mfaLastUsedAt | |
| passwordLastUsedAt | |
| passwordSet | |
| profilePictureUrl | |
| updatedAt | |
| } | |
| } |
| { | |
| "data": { | |
| "user": { | |
| "connectedAccounts": [ | |
| { | |
| "email": "email_example", | |
| "firstName": "firstName_example", | |
| "id": "id_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "lastLoginAt": "2024-01-01T00:00:00.000Z", | |
| "lastName": "lastName_example", | |
| "profilePictureUrl": "profilePictureUrl_example", | |
| "provider": "AppleOAuth" | |
| } | |
| ], | |
| "createdAt": "2024-01-01T00:00:00.000Z", | |
| "email": "email_example", | |
| "emailVerified": true, | |
| "firstName": "firstName_example", | |
| "id": "id_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "lastName": "lastName_example", | |
| "mfaEnabled": true, | |
| "mfaLastUsedAt": "2024-01-01T00:00:00.000Z", | |
| "passwordLastUsedAt": "2024-01-01T00:00:00.000Z", | |
| "passwordSet": true, | |
| "profilePictureUrl": "profilePictureUrl_example", | |
| "updatedAt": "2024-01-01T00:00:00.000Z" | |
| } | |
| } | |
| } |
user
Parameters
id: ID!
Returns User!
createdAt: DateTime!
email: String!
emailVerified: Boolean!
firstName: String
id: ID!
lastName: String
profilePictureUrl: String
updatedAt: DateTime!
Updates the authenticated user’s profile (first name, last name, locale).
| mutation UpdateProfile($input: UpdateProfileInput!) { | |
| updateProfile(input: $input) { | |
| __typename | |
| ... on ProfileUpdated { | |
| user { | |
| createdAt | |
| emailVerified | |
| firstName | |
| id | |
| lastName | |
| mfaEnabled | |
| mfaLastUsedAt | |
| passwordLastUsedAt | |
| passwordSet | |
| profilePictureUrl | |
| updatedAt | |
| } | |
| } | |
| } | |
| } |
| { | |
| "data": { | |
| "updateProfile": { | |
| "__typename": "InvalidLocale" | |
| } | |
| } | |
| } |
updateProfile
Parameters UpdateProfileInput!
Returns UpdateProfileResult!
Sends a verification code to the user’s current email address to prove ownership before changing email.
| mutation SendVerificationCode { | |
| sendVerificationCode { | |
| __typename | |
| ... on DailyEmailQuotaExceeded { | |
| message | |
| } | |
| ... on VerificationCodeSent { | |
| authenticationChallengeId | |
| expiresAt | |
| } | |
| } | |
| } |
| { | |
| "data": { | |
| "sendVerificationCode": { | |
| "__typename": "DailyEmailQuotaExceeded", | |
| "message": "message_example" | |
| } | |
| } | |
| } |
sendVerificationCode
Returns SendVerificationCodeResult!
Verifies the code sent to the current email address. Returns an elevated access token required for sendEmailChange and confirmEmailChange.
| mutation VerifyCurrentEmail($input: VerifyCurrentEmailInput!) { | |
| verifyCurrentEmail(input: $input) { | |
| __typename | |
| ... on CurrentEmailVerified { | |
| elevatedAccessToken | |
| expiresAt | |
| } | |
| ... on VerificationCodeExpired { | |
| message | |
| } | |
| ... on VerificationCodeIncorrect { | |
| message | |
| } | |
| ... on VerificationCodePreviouslyUsed { | |
| message | |
| } | |
| ... on VerificationTooManyAttempts { | |
| message | |
| } | |
| } | |
| } |
| { | |
| "data": { | |
| "verifyCurrentEmail": { | |
| "__typename": "CurrentEmailVerified", | |
| "elevatedAccessToken": "elevatedAccessToken_example", | |
| "expiresAt": "expiresAt_example" | |
| } | |
| } | |
| } |
verifyCurrentEmail
Parameters VerifyCurrentEmailInput!
Returns VerifyCurrentEmailResult!
Sends a verification code to the new email address. Requires an elevated access token from verifyCurrentEmail. The user must confirm with the code via confirmEmailChange.
| mutation SendEmailChange($input: SendEmailChangeInput!) { | |
| sendEmailChange(input: $input) { | |
| __typename | |
| ... on DailyEmailQuotaExceeded { | |
| message | |
| } | |
| ... on EmailChangeNotAvailable { | |
| message | |
| } | |
| ... on EmailChangeSent { | |
| expiresAt | |
| } | |
| ... on EmailManagedByProvider { | |
| message | |
| } | |
| ... on EmailNotAvailable { | |
| message | |
| } | |
| ... on IdentityVerificationExpired { | |
| message | |
| } | |
| ... on IdentityVerificationInvalid { | |
| message | |
| } | |
| ... on InvalidEmail { | |
| message | |
| } | |
| } | |
| } |
| { | |
| "data": { | |
| "sendEmailChange": { | |
| "__typename": "DailyEmailQuotaExceeded", | |
| "message": "message_example" | |
| } | |
| } | |
| } |
sendEmailChange
Parameters SendEmailChangeInput!
Returns SendEmailChangeResult!
Confirms an email change using the verification code sent to the new email address. Requires an elevated access token from verifyCurrentEmail.
| mutation ConfirmEmailChange($input: ConfirmEmailChangeInput!) { | |
| confirmEmailChange(input: $input) { | |
| __typename | |
| ... on EmailChangeCodeExpired { | |
| message | |
| } | |
| ... on EmailChangeCodeIncorrect { | |
| message | |
| } | |
| ... on EmailChangeCodePreviouslyUsed { | |
| message | |
| } | |
| ... on EmailChangeConfirmed { | |
| elevatedAccessToken | |
| expiresAt | |
| user { | |
| createdAt | |
| emailVerified | |
| firstName | |
| id | |
| lastName | |
| mfaEnabled | |
| mfaLastUsedAt | |
| passwordLastUsedAt | |
| passwordSet | |
| profilePictureUrl | |
| updatedAt | |
| } | |
| } | |
| ... on EmailChangeTooManyAttempts { | |
| message | |
| } | |
| ... on EmailManagedByProvider { | |
| message | |
| } | |
| ... on EmailNotAvailable { | |
| message | |
| } | |
| ... on IdentityVerificationExpired { | |
| message | |
| } | |
| ... on IdentityVerificationInvalid { | |
| message | |
| } | |
| ... on InvalidEmail { | |
| message | |
| } | |
| ... on NoPendingEmailChange { | |
| message | |
| } | |
| } | |
| } |
| { | |
| "data": { | |
| "confirmEmailChange": { | |
| "__typename": "EmailChangeCodeExpired", | |
| "message": "message_example" | |
| } | |
| } | |
| } |