Set Community Link
Directly link an authenticated community account to an in-game user ID.
CAD Frontend Iframe Event
window.parent.postMessage({
type: 'scad:account-link',
accountUuid: '11111111-1111-1111-1111-111111111111',
secretUuid: '22222222-2222-2222-2222-222222222222',
}, '*');const cadFrame = document.getElementById('cadFrame');
const cadOrigin = new URL(cadFrame.src).origin;
window.addEventListener('message', (event) => {
if (event.source !== cadFrame.contentWindow || event.origin !== cadOrigin) return;
if (event.data?.type !== 'scad:account-link') return;
const { accountUuid, secretUuid } = event.data;
// Forward these values to the trusted game server. The server derives the
// player's communityUserId and calls POST /v2/general/links/set.
});Request Body
Example Request
Response
Last updated
Was this helpful?

