كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(12)
Chapter
(12)
باب
Sahih al-Bukhari 3999

Narrated 'Ubada bin As-Samit:

(who was one of the Badr warriors) Allah's Messenger (ﷺ) said, "Give me the pledge of allegiance."

حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، قَالَ أَخْبَرَنِي أَبُو إِدْرِيسَ، عَائِذُ اللَّهِ بْنُ عَبْدِ اللَّهِ أَنَّ عُبَادَةَ بْنَ الصَّامِتِ، وَكَانَ، شَهِدَ بَدْرًا أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ بَايِعُونِي ‏"‏‏.‏
Reference : Sahih al-Bukhari 3999
In-book reference : Book 64, Hadith 50
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 334
  (deprecated numbering scheme)