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. He goes on his security page and click on the Reset link. A new different key is automatically generated. The user needs to enter the new key on the external application.
To see the page:
- user must not be a administrator (Moodle cannot generate a token for administrator).
- user must have the moodle/webservice:createtoken capability
- to see the web service function documentation, the documentation feature most be enabled by an administrator in Site Administration > Plugins > Web services > Manage protocols