Welcome to the Kinde community.

P
K
A
A
A

getting emails for a user using the Kinde management api

Hello, I’d like to get all of the emails that Kinde has for a user using the management API.

I tried with the expand=identities query parameter of GET /api/v1/user as well as using the more detailed GET /api/v1/users/{user_id}/identities.

In both cases I get a response similar this one. You’ll notice that for social logins we only know the ID of the user on the social platform and not his email. In the Kinde interface I can see both my emails so I guess the data is somewhere.

{
  code: 'OK',
  message: 'Success',
  has_more: false,
  identities: [
    {
      id: 'identity_01905d43e802a5d9790edc101033abce',
      name: 'noe.charmet@allegoria.io',
      type: 'email',
      created_on: '2024-05-09T23:31:07.829075+00:00',
      is_confirmed: true,
      total_logins: 0,
      last_login_on: null
    },
    {
      id: 'identity_01905d43e80212ec58ecf28f9a52023e',
      name: 'google:100751070150657163917',
      type: 'oauth2:google',
      created_on: '2024-05-09T23:31:07.829075+00:00',
      is_confirmed: true,
      total_logins: 16,
      last_login_on: '2024-09-30T07:33:01.669987+00:00'
    }
  ]
}

N
P
C
5 comments

Hi Noé

Let me ask the team and get back to you.

Hi sorry for the delayed response, we're a bit tight on resources this week. Hoping to get you an answer today. Just making sure you know we haven't forgotten you 🙂

Hi again
There's a known issue capturing the emails from social sources. If you turn on the option to "Trust email providers..." in the social connection (Settings > Authentication then select Configure on the relevant tile.)
Switch the option on and Save.

Attachment
image.png

Any new sign ups via social providers will capture the email in the user record. Unfortunately, for existing users, this info is not captured on next sign in. They would need to be re-added.

Add a reply
Sign up and join the conversation on Slack
Join