# 'Invalid value "discord"\\' on property provider (Identity provider of the secondary user account being linked)

**URL:** <https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472>\
**Category:** Get Help\
**Created:** [June 14, 2021, 4:54pm UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472 "2021-06-14T16:54:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hello9](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello9/32/30013_2.png) [@hello9](https://community.auth0.com/u/hello9)\
**Post date:** [June 14, 2021, 4:54pm UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/1 "2021-06-14T16:54:09Z")

</div>

Hello developers. I trying linking two accounts. Google and Facebook already linked and work great. Now, I want to link those accounts with discord. Here is my code example, but nothing works.

```auto
  let x = await axios.post(`${key.auth0Path}/api/v2/users/${firstId}/identities`,
        {
            "provider": "discord",
            "user_id": secondUserId
        },
        {
            headers: {
                'authorization': `Bearer ${accessKey}`,
                'Content-Type': 'application/json'
            }
        }).catch((err) => {
            console.log("from link auth0 ", err);
            res.status(400)
            res.send({ status: err })
            return;
        })

```

But always got the error  
`message: 'Payload validation error: \'Invalid value "discord"\' on property provider (Identity provider of the secondary user account being linked).'`  
How I can solve it?

---

<div class="post-metadata">

**Author:** ![hello9](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello9/32/30013_2.png) [@hello9](https://community.auth0.com/u/hello9)\
**Post date:** [June 14, 2021, 5:35pm UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/2 "2021-06-14T17:35:53Z")

</div>

I see this error with Twitch, Discord, and Reddit. Auth query returned to me `oauth2|twitch|{user_id}` provider. How I can use this provider properly with the query above?

---

<div class="post-metadata">

**Author:** ![hello9](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello9/32/30013_2.png) [@hello9](https://community.auth0.com/u/hello9)\
**Post date:** [June 15, 2021, 8:51am UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/3 "2021-06-15T08:51:06Z")

</div>

By the way, Facebook, Google, Linkedin, Twitter work perfectly with the query above.

---

<div class="post-metadata">

**Author:** ![hello9](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello9/32/30013_2.png) [@hello9](https://community.auth0.com/u/hello9)\
**Post date:** [June 15, 2021, 12:56pm UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/4 "2021-06-15T12:56:33Z")

</div>

I found the solution.  
You must set this parameter if you want to use oauth2  
`{ provider: "oauth2", user_id: "twitch|{user_id}" }`

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 25, 2021, 11:34am UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/5 "2021-06-25T11:34:22Z")

</div>

Perfect! Thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 25, 2021, 11:34am UTC](https://community.auth0.com/t/invalid-value-discord-on-property-provider-identity-provider-of-the-secondary-user-account-being-linked/64472/6 "2021-06-25T11:34:25Z")

</div>


