---
title: FetchTokensForUserUserError - Shop Partners API
description: A user or client error that could occur during the execution of the `fetchTokensForUser` mutation.
api_version: unstable latest
source_url:
  html: https://shopify.dev/docs/api/shop-partners/latest/objects/FetchTokensForUserUserError
  md: https://shopify.dev/docs/api/shop-partners/latest/objects/FetchTokensForUserUserError.md
---

# Fetch​Tokens​For​User​User​Error

object

A user or client error that could occur during the execution of the `fetchTokensForUser` mutation.

## Fields

* code

  [Fetch​Tokens​For​User​User​Error​Error​Code!](https://shopify.dev/docs/api/shop-partners/latest/enums/FetchTokensForUserUserErrorErrorCode)

  non-null

  Error code associated with the error.

* field

  [\[String!\]!](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

  non-null

  Path to input field which caused the error.

* message

  [String!](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

  non-null

  The error message.

***

## Map

No referencing types

***

## Mutations

* [fetch​Tokens​For​User](https://shopify.dev/docs/api/shop-partners/latest/mutations/fetchTokensForUser)

  mutation

  Fetch an OAuth Access and Refresh Token pair for a user. Exactly one of `publicId` or `consentToken` must be provided.

  When `publicId` is provided, the user's existing connection with the client is verified and tokens are issued for the consented scope.

  When `consentToken` is provided — a signed JWT from a Sign in with Shop flow granting delegated consent from a merchant's buyer connection to this partner — the token is verified, a delegated user connection is established, and tokens are issued for the delegated scope.

  * consent​Token

    [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    ### Arguments

    Signed JWT consent token from a Sign in with Shop flow granting delegated access. Required when not providing a public ID.

  * public​Id

    [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    The public ID of the user. Required when not providing a consent token.

  ***

***

## FetchTokensForUserUserError Mutations

### Mutated by

* [fetch​Tokens​For​User](https://shopify.dev/docs/api/shop-partners/latest/mutations/fetchTokensForUser)