President Barack Obama makes his debut on comedian Zach Galifianakis' web-based talk show "Between Two Ferns" Tuesday.

White House aides told the New York Times the president is appearing on the show to encourage young people to enroll in Obamacare through Healthcare.gov.

Obama cracked several jokes throughout the video, telling Galifianakis running for president a third time would be like making a third "Hangover" movie -- which Galifianakis did in 2013.

"Didn't really work out very well, did it?" Obama said.

The president did promote Obamacare, saying "I think it's fair to say that I wouldn't be with you here today if I didn't have something to plug." But Galifianakis asked Obama about other topics, including building his presidential library "in your home country of Kenya" and what it would be like when no one would let him win at basketball anymore.

Though Obama has appeared on several talk shows and hosted Google Hangouts that appeared across entertainment networks, "Between Two Ferns" is new territory for the president. The shows host has gained a reputation for off-color humor on the show, even spanking singer Justin Bieber in one episode.

Dan Pfeiffer, Obama's senior adviser, told the Times the appearance is part of the president's constantly evolving communications strategy.

“We have to find ways to break through,” said Pfeiffer. “This is essentially an extension of the code we have been trying to crack for seven years now.”

Watch the interview above.