Sanity Library Reference Docs
    Preparing search index...

    Function defineRobotToken

    • Beta

      Defines a Robot Token for automated access. Has a token property provided during deployment that can be referenced by other resources.

      defineRobotToken({
      name: 'my-robot',
      memberships: [{
      resourceType: 'project',
      resourceId: projectId,
      roleNames: ['editor'],
      }],
      })

      Parameters

      • parameters: BlueprintRobotTokenConfig

        The robot token configuration

        Deploying Robot Tokens via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.

        Configuration for a robot token that provides automated access.

        • Optional Betalabel?: string

          A descriptive label for the robot token and its use case

          The name of the resource

        • Betamemberships: RobotTokenMembership[]
        • Betaname: string
        • Optional BetaresourceId?: string
        • Optional BetaresourceType?: RobotTokenResourceType

      Returns BlueprintRobotTokenResource

      The robot token resource