#Get full Discord User Data with oAuth

1 messages · Page 1 of 1 (latest)

fair void
#

Right now, once I log into my Discord account, the only data i have available is

{
  user: {
    id: '',
    name: '',
    image: ''
  },
  expires: '',
  accessToken
}``` where ID isn't the user's Discord ID but the token sub. I have the guilds and identify scopes enabled and i want to fetch the rest of the data including the users id
tight plazaBOT
#

Hi @fair void. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources provided do not contain information on how to fetch full user data from Discord using OAuth. As an AI assistant for NextJS, I can provide information based on the knowledge sources given to me.

For your specific question, I would recommend checking Discord's official API documentation or relevant OAuth guides to understand how to fetch the complete user data.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@fair void kapa.ai is still learning and improving, please let us know how it did by reacting below

fair void
#

@tight plaza what is the token sub and what can i use it for?

tight plazaBOT
#

Let me check the knowledge base for you. One moment! :books:

#

The "sub" in a token typically refers to the "subject" claim in a JWT (JSON Web Token). It's a claim that holds an identifier for the user who is the subject of the token. This identifier is usually unique to a particular user and can be used to identify the user in your system.

In the context of OAuth, the "sub" claim in a token is often used to maintain user sessions or to make authorized API requests on behalf of the user.

However, the specific usage can vary depending on the implementation. For example, in the context of the Vercel API, a token is used for authorization to execute certain commands or to interact with certain services, as seen in the Vercel CLI Global Options (https://vercel.com/docs/cli/global-options#token) and the Vercel Blob SDK (https://vercel.com/docs/storage/vercel-blob/using-blob-sdk#read-write-token) documentation.

Please note that the exact usage and meaning of the "sub" claim can vary depending on the specific service or API you are interacting with. Always refer to the specific service's documentation for accurate information.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@fair void kapa.ai is still learning and improving, please let us know how it did by reacting below

fair void
#

@tight plaza how can i get the users id with their token sub?

tight plazaBOT
#

Let me check the knowledge base for you. One moment! :books:

#

I'm sorry, but the knowledge sources provided do not contain information on how to retrieve a user's ID using their token subject ("sub"). The process to do this can vary greatly depending on the specific service or API you are interacting with.

In general, you would need to make an authenticated request to the service's API, passing the token as part of the authorization header. The API should then return the user's information, including their ID. However, this is a general approach and might not apply to all services.

I would recommend checking the specific service's API documentation for accurate information on how to retrieve a user's ID using their token subject.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: