-
-
Save sendbird-community/d65bf40fee773a6478bb91677ce601fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createUrl = async () => { | |
const context = await client.instance.context() | |
const service_user_id = `service_user_${context.data.ticketCreatorData.contact.id}` | |
const data = await client.request.invoke("buildBackupGroupCallUrl", {userId: | |
service_user_id} ) | |
/* Modal of returned data.response. | |
{ | |
"service_user_id": "service_user_150006383534", | |
"room_id": "b1650746-e810-4aeb-ae2a-422d8a42523c", | |
"app_id": "YOUR_APP_ID", | |
"creds": { | |
"token": "SOME_SENDBIRD_SESSION_TOKEN", | |
"expires_at": 1672902388000 | |
} | |
} | |
*/ | |
roomId = data.response.room_id | |
const url = `http://localhost:1234/?data=${btoa(JSON.stringify(data.response))}` | |
document.getElementById('link').innerHTML = url | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment