Skip to content

generateTotpSecret

Generate TOTP secret for a user.

Arguments

Argument Type Description
userId (required) String! Specifies the user ID.

Returns

GenerateTotpSecretReply!

Sample

mutation GenerateTotpSecret($userId: String!) {
  generateTotpSecret(userId: $userId) {
    secret
    secretUri
  }
}
{
  "userId": "example-string"
}
{
  "data": {
    "generateTotpSecret": {
      "secret": "example-string",
      "secretUri": "example-string"
    }
  }
}