SHOHIL SETHIA
SHOHIL SETHIA

Reputation: 2227

To generate Moodle Web Service Token with required capabilities Dynamically from Non-Moodle Application

Is there a way present to generate Moodle Web Service Token with required capabilities Dynamically from Non-Moodle Application ?

Upvotes: 0

Views: 2873

Answers (1)

jsherk
jsherk

Reputation: 6472

Currently I am only aware of you being able to generate an access token from directly within the Moodle (Site Admin > Plugins > Webservices > Manage Tokens).

If you were running a script on the same server as your Moodle installation, then I suppose you could hack the code and figure out which php files are needed and then include them in your script.

EDIT:

I may be incorrect with my answer above... I came across the following documentation https://docs.moodle.org/dev/Creating_a_web_service_client which notes that you can request a token from /login/token.php However the documentation is for Moodle v2.2 and since Moodle is already up to v3.3 you would need to do some more digging to see if that feature is still available on these newer versions or not.

Upvotes: 1

Related Questions