No permission to create web service token for the service

No permission to create web service token for the service

by john felix -
Number of replies: 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.

Average of ratings: -
In reply to john felix

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

by 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)

Average of ratings: Useful (1)
In reply to Jérôme Mouneyrac

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

by 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.

In reply to john felix

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

by 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.


Average of ratings: Useful (1)