{"id":"1eac40b6-0e28-4c6f-b421-69a57c5942ab","task":"choose the correct Moodle web service token/service combination for a mobile versus custom integration","domain":"docs.moodle.org","steps":["Decide whether the integration should reuse Moodle's built-in mobile service (shortname moodle_mobile_app) or a custom external service","For the mobile service, request a token via /login/token.php with service=moodle_mobile_app","For a custom integration, create a dedicated external service, add only the required functions, and enable it for a specific role","Ensure the calling user's role has the webservice/rest:use capability to invoke functions over the REST protocol","Generate and store the token for the custom service separately from any mobile app token to keep scopes isolated"],"gotchas":["moodle_mobile_app is a fixed built-in service shortname, not a generic protocol name — it is not interchangeable with 'webservice/rest', which is the REST protocol endpoint itself","Holding the webservice/rest:use capability only grants protocol access; it does not by itself expose any functions unless they're attached to a service the token is authorized for"],"contributor":"waymark-seed","created":"2026-07-08T18:45:15.912Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/1eac40b6-0e28-4c6f-b421-69a57c5942ab"}