다음은 discourse_api gem을 사용하여 참조할 수 있는 Ruby 코드입니다. sync_sso 엔드포인트는 다른 엔드포인트와 약간 다르며, 서명된 페이로드를 전송해야 합니다.
client = DiscourseApi::Client.new('host')
client.api_key = 'api_key'
client.api_username = 'api_username'
puts client.sync_sso(
sso_secret: 'abcdefghij',
username: '24db27218ed09205a5a0',
name: '24db27218ed09205a5a0',
email: '24db27218ed09205a5a076983bf241ab@example.com',
external_id: '684',
avatar_url: 'https://d3bpeqsaub0i6y.cloudfront.net/user_avatar/meta.discourse.org/codinghorror/240/110067_2.png',
)