user Token Verifymutation
mutation
Verifies a user token. See Verifying requests for more details.
Anchor to inputInput
Input arguments for the mutation.
- Anchor to tokentokenstringrequired
The temporary user token to verify.
MutationUserTokenVerifyArgs
- token
The temporary user token to verify.
string
export interface MutationUserTokenVerifyArgs {
/**
* The temporary user token to verify.
*/
token: string
}
Was this section helpful?
Anchor to return typeReturn type
This mutation returns a object with the following fields:
- Anchor to userErrorsuserErrorsUserTokenVerifyUserError[]required
List of errors that occured while executing the mutation.
- Anchor to publicIdpublicIdstring | null
The public ID of the user.
- Anchor to tokenExpiresAttokenExpiresAtISO8601DateTime | null
The expiration date of the token.
- Anchor to userStateuserState'VERIFIED' | 'GUEST' | null
The state of the user.
- Anchor to userIdentifieruserIdentifierstring | nulldeprecated
A permanent identifier for the user.
DeprecatedUse publicId instead.
UserTokenVerifyPayload
- publicId
The public ID of the user.
string | null
- tokenExpiresAt
The expiration date of the token.
ISO8601DateTime | null
- userErrors
List of errors that occured while executing the mutation.
UserTokenVerifyUserError[]
- userIdentifier
A permanent identifier for the user.
string | null
- userState
The state of the user.
'VERIFIED' | 'GUEST' | null
export interface UserTokenVerifyPayload {
/**
* The public ID of the user.
*/
readonly publicId?: string | null
/**
* The expiration date of the token.
*/
readonly tokenExpiresAt?: ISO8601DateTime | null
/**
* List of errors that occured while executing the mutation.
*/
readonly userErrors: (UserTokenVerifyUserError | null)[]
/**
* A permanent identifier for the user.
* @deprecated Use publicId instead.
*/
readonly userIdentifier?: string | null
/**
* The state of the user.
*/
readonly userState?: 'VERIFIED' | 'GUEST' | null
}
ISO8601DateTime
string
UserTokenVerifyUserError
- code
Error code associated with the error.
| 'TOKEN_INVALID' | 'TOKEN_EXPIRED' | 'INVALID_MINI' | 'USER_NOT_FOUND'
- field
Which input value this error came from.
string[]
- message
A description of the error.
string
export interface UserTokenVerifyUserError {
/**
* Error code associated with the error.
*/
readonly code:
| 'TOKEN_INVALID'
| 'TOKEN_EXPIRED'
| 'INVALID_MINI'
| 'USER_NOT_FOUND'
/**
* Which input value this error came from.
*/
readonly field?: (string | null)[]
/**
* A description of the error.
*/
readonly message: string
}
Was this section helpful?
Usage
mutation VerifyUserToken($token: String!) {
userTokenVerify(token: $token) {
tokenExpiresAt
publicId
userErrors {
code
field
message
}
}
}
examples
Usage
mutation VerifyUserToken($token: String!) { userTokenVerify(token: $token) { tokenExpiresAt publicId userErrors { code field message } } }