Challenges can also be embedded via iFrame just like code editor.
You can see a quick demo in action here https://onecompiler.github.io/editor-embed-demo/challenges.html

<iframe 
  frameBorder="0" 
  height="700px" 
  width="100%"
  src="https://onecompiler.com/embed/challenges/3w7dby3mt/beginners-coding-challenge"
></iframe>

If you are planning to use the Challenges to be integrated in your LMS/ Website and make your application users take the challenges, please explore the Enterprise APIs section.

More options via query parameters

Query ParameterDescription
theme=darkLoad challenge in Dark Theme
hideLanguageSelection=trueDisable the Language switch button
hideNew=trueDisable the Language switch button
apiKeyYour API account key
userApiTokenToken you get when sync your application users
challengeEvents=trueTo receive the events of the challenge in parent website

Capture Challenge Events

You can capture the events of the challenge in your parent website by using challengeEvents=true

In the parent website catch the onmessage events. Following is the sample code to demonstrate

<script>
        window.onmessage = function (e) {
            if (e.data && e.data.action) {
                console.log(e.data);
                // handle the e.data which contains following
                // action (ex. challengeFinished), challengeId & userId)
            }
        };
</script>