Error while linking account

When i try to link 2 users account i got an error
data: { statusCode: 400, error: 'Bad Request', message: 'Invalid token (link_with).', errorCode: 'invalid_body' }

this is option for this call

let options = {
            method: 'POST',
            url: `${config.auth0.api}users/${currentUser}/identities`,
            headers: {
                authorization: 'Bearer ' + token,
                'content-type': 'application/json'
            },
            data: {
                link_with: subTargetUser
            },
            responseType: 'json'
        };

token = AccessTokens
currentUser = google-oauth2|XXXXXXXXXXXXXXXX
targetUser = auth0|XXXXXXXXXXXXXX

what i am doing wrong ?

Hi @goshatravin,

Welcome to the Community!

You are combining the two different ways of invoking this endpoint.

Take a look at the documentation and choose one of the two strategies:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.