Get user token

Re: Get user token

by Trushal Shah -
Number of replies: 0

Nice one, 

I have one question 


https://www.yourmoodle.com/login/token.php?username=USERNAME&password=PASSWORD&service=SERVICESHORTNAME //Moodle mobile service shortname => moodle_mobile_app

Get in return: {token:4ed876sd87g6d8f7g89fsg6987dfh78d}

here we can create external service from moodle , then how we can identify that this user have assign this service , because in above URL we need to fill parameter of service moodel_mobile_app


for example i create service for student with name Moodle_student 

and fort teacher Moodle_teacher , here how to set service name for teacher and student dynamically 


https://www.yourmoodle.com/login/token.php?username=USERNAME&password=PASSWORD&service=Moodle_student


https://www.yourmoodle.com/login/token.php?username=USERNAME&password=PASSWORD&service=Moodle_teacher


how to check run time ?


Thanks