The only evidence we have that Trump took it is Trump saying he was taking it, and the press secretary while not giving a white house briefing directly saying it was prescribed[1], and the White House physician saying that he didn't see any harm in Trump taking it...[3] but I cannot find a single authoritative report [2] where someone claims to have actually prescribed the drug to Trump - from either the physician, or from Trump himself (remembering it is a prescription drug). The White House press office also never used those words that I can see, instead deflecting that whatever Trump said should be believed (while on the podium at a briefing, where there would be an accountability issue).
So, short version: it was implied by the people who would've had to prescribe it to him that they saw no problem giving it to him if he wanted it...but it seems like everyone carefully avoided saying they actually did prescribe it.
Now, on some level this is irrelevant whether he took it. Because he used the presidential podium to contradict medical professionals and push an ineffective treatment, created a shortage for a drug which a lot of people actually depended on (I knew a colleague who suddenly ran into trouble with this), which as it turned out provided no useful effect in preventing the president from actually catching COVID-19 and has since then continuously proven to be completely ineffective.
White house physician said he was on it.
Also studies are mixed on it's efficacy. The ones showing it was supposedly harmful were fake.