No permission to create web service token for the service

No permission to create web service token for the service

per john felix -
Nombre de respostes: 3

Hi, 

   I am trying to create a token using the login.php after user sign up. But I am getting the "No permission to create web service token for the service " error. How can I solve this? I have added the service as a built in service and it also has a shortname in the db as mentioned in the documentation.

 

Thanks.

Mitjana de qualificacions: -
En resposta a john felix

Re: No permission to create web service token for the service

per Jérôme Mouneyrac -

Hi John,

check the user has moodle/webservice:createtoken on system context. (http://docs.moodle.org/22/en/How_to_create_and_enable_a_web_service#Enabling_capabilities)

En resposta a Jérôme Mouneyrac

Re: No permission to create web service token for the service

per john felix -

Thanks for the tip. It worked. I actually forgot to create a system wide context with create token and assign it to the user.

En resposta a john felix

Re: No permission to create web service token for the service

per Urvesh Nagda -

yes add/create a token by:
home > site administration > plugins > web services > manage tokens

also make sure you allow check field at:
Site administration > Plugins > Web services > External services, edit "Moodle Mobile additional features" and check the "Enabled" field, then save changes.

Then go to Site administration > Users > Permissions > Define roles, edit the Authenticated user role and allow the capability moodle/webservice:createtoken.