Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2363

Re: how do I get the user id of a token?

$
0
0
by Malte Reißig.  

Hi i!

- Add the "core_webservice_get_site_info" function call to your "ExternalService"-Configuration
- Ask the "core_webservice_get_site_info" with a wstoken and the response will get you the 'userid' (among other infos) related to this wstoken.

And depending on the function and your "webservice authenticaton method" configuration:
- Double check if the "User" (related to the "wstoken" you're talking to the moodle-webservice with) has the necessary "Capability" or "Role" active (set to 'true') to actually call the function.

Cheers & Have Fun!

Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>