I have solved it using accessToken. The solution is described in this link:
But currently I am searching a way to transfer external ids without token, just using Cloud Code.
Do you mean during the process of merging an account?
We merge accounts by transferring all the data manually in Cloud Code from one account to target and then reauthenticate a user with the target account credentials. We transfer all the data without problems, but can't find a way to transfer external authentication without token.
Currently I transfer the external authentication by sending the auth token to the Event, social disconnect and then authenticate with this token. But, I don't think it's a good way. There might be specific situations when there would be needed to transfer auth when a user won't have a valid auth token (expired or etc.).
Another question: Is there better way to merge accounts than the way we use?
We designed a very nice crossplatform account binding and transfer system for our game using Cloud Code.
From user perspective - Main account binding goes to game services (Google Play, Game Center), but user also can link his/her Facebook account and play with the same progress from his desktop Facebook. Also user can relink Facebook to another game service account and play with that progress on desktop.
Some minor issues left to do (like account transfer) to make it reliable for all situations.
I hope you can help us with this.