catalyst / moodle-auth_userkey

Log in to Moodle using one time user key based login URL. Auth plugin for organising simple SSO (single sign on) between moodle and your external web application.
https://moodle.org/plugins/auth_userkey
83 stars 53 forks source link

Test script for plugin doesn't work always receiving "invalid parameter" error #66

Closed digitalpraesidium closed 3 years ago

digitalpraesidium commented 3 years ago

Hallo,

we are trying to use your plugin in order to apply a one time login to our Moodle platform (https://athenaeumtest.gruppoallconsulting.com) from our management system.

We have tried to run the PHP script we have found on GitHub like an example, after adjusting it with our parameters. We have also changed the CURL library, using the native CURL of PHP instead of external library.

In attachment you can see our script that doesn't work and following you can see the error message which is always sent back. {"exception":"invalid_parameter_exception","errorcode":"invalidparameter","message":"E' stato rilevato un parametro non valido"}

The webservice is called correctly but there is an invalid parameter that we cannot understand what is it.

Thanks for your support

Digital Praesidium

funzione PHP.txt

dmitriim commented 3 years ago

hi @digitalpraesidium I guess this error means that you are doing something wrong and sending a data in incorrect format or incorrect structure. I'd suggest to call other core web services to make sure they work for you. Maybe this docs will be useful of you https://docs.moodle.org/dev/Creating_a_web_service_client