Abdullah bin Amr bin As reported,

I used to write down everything I heard from the Messenger of Allah ﷺ, wanting to memorize it. The Quraysh forbade me, saying, "Do you write down everything you hear from the Messenger of Allah ﷺ? The Messenger of Allah ﷺ is a human being who speaks in anger and in pleasure."So I held back from writing and mentioned this to the Messenger of Allah ﷺ. He pointed with his finger to his mouth and said, "Write. By the One in whose hand is my soul, nothing comes out of it except the truth."

Azami 1169

Sahih

عن عبد الله بن عمرو بن العاص، قال

كنت أكتب كل شيء أسمعه من رسول الله ﷺ أريد حفظه، فنهتني قريش، وقالوا: لا تكتب كل شيء تسمعه من رسول الله ﷺ، ورسول الله ﷺ بشر يتكلم في الغضب والرضا، فأمسكت عن الكتاب، فذكرت ذلك لرسول الله ﷺ، فأومأ بإصبعه إلى فيه، فقال: اكتب، فو الذي نفسي بيده ما يخرج منه إلا حق.

الأعظمي 1169صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Recording of knowledge
Numbering
Jami al-Kamil 1169 (2nd edition)
Azami 1169