How to get a security key
From MoodleDocs
A user goes on his security keys page (My profil block > security keys). He gets a security key (also called token). He enters the key on the external application accessing to Moodle. At any time, a user can reset the key if he suspects that it has been stolen.