Iyas b. Salama reported on the authority of his father that Allah's Messenger (ﷺ) gave sanction for contracting temporary marriage for three nights in the year of Autas 1847 and then forbade it.
Sahih Muslim Book 16, Hadith 21