# validateTokenStep - Medusa Core Workflows Reference

This documentation provides a reference to the `validateTokenStep`. It belongs to the `@medusajs/medusa/core-flows` package.

This step validates a specified token and returns its associated invite.
If not valid, the step throws an error.

```ts title="src/workflows/my-workflow.ts"
import { createWorkflow } from "@medusajs/framework/workflows-sdk"
import { validateTokenStep } from "@medusajs/medusa/core-flows"

const myWorkflow = createWorkflow(
  "my-workflow",
  () => {
    const data = validateTokenStep("{value}")
  }
)
```

## Input

- string: (\`string\`)

  - string: (\`string\`)

## Output

- InviteDTO: (\[InviteDTO]\(../../../../../user/interfaces/user.InviteDTO/page.mdx)) The invite details.

  - id: (\`string\`) The ID of the invite.

  - email: (\`string\`) The email of the invite.

  - accepted: (\`boolean\`) Whether the invite is accepted.

  - token: (\`string\`) The token of the invite.

  - expires\_at: (\`Date\`) The invite's expiry date.

  - metadata: (\`null\` \\| \`Record\<string, unknown>\`) Holds custom data in key-value pairs.

  - created\_at: (\`Date\`) The invite's creation date.

  - updated\_at: (\`Date\`) The invite's update date.

  - deleted\_at: (\`null\` \\| \`Date\`) The invite's deletion date.

  - roles: (\`null\` \\| \`string\`\[]) The RBAC roles to assign to the user when the invite is accepted.


---

The best way to deploy Medusa is through Medusa Cloud where you get autoscaling production infrastructure fine tuned for Medusa. Create an account by signing up at cloud.medusajs.com/signup.
