Quantcast
Channel: Web services
Viewing all 2361 articles
Browse latest View live

Updating an account password via Web Service API?

$
0
0

by Kevin Robinson.  

Hi,

I have a website with a login that is already integrated with a database system that needs to be the master system.

i.e. my database needs to be the holder of the most upto date user details and password.

My client wants me to integrate with a Moodle site and I need to be able to automatically sign the user into Moodle when they sign in to my web site.

Any time the user updates any of their account details including their password via my web site i need to update the account details and password in Moodle to match.

Is there an API that can be used to update a user password ?

Any help would be appreciated.



Re: Updating an account password via Web Service API?

$
0
0

by Dorel Manolescu.  

Hi

From the web-services documentation under yoursite/admin/webservice/documentation.php

Check:

core_user_update_users 

Parameters:

list of ( 
object {
id int //ID of the user
username string Optional//Username policy is defined in Moodle security config.
password string Optional//Plain text password consisting of any characters
firstname string Optional//The first name(s) of the user
Regards


Re: Updating an account password via Web Service API?

$
0
0

by Kevin Robinson.  

Hi,

Thank you very much for your reply.

Does Moodle have a developer sandbox area that i can test web methods or do i need to install Moodle ?


Re: Updating an account password via Web Service API?

$
0
0
by Dorel Manolescu.  

Hi

I think you need to install moodle.

Regards

Re: Updating an account password via Web Service API?

$
0
0
by Olumuyiwa Taiwo.  

> I need to be able to automatically sign the user into Moodle when they sign in to my web site.

Perhaps what you really need is a Moodle auth plugin that does SSO with the main system?

login and registration form

$
0
0
by michael latif.  

can anyone tell me how can I start using web service or API to build our own login and registration form and use them for Moodle 

Best Web Development Services at affordable prices.

$
0
0
by Smart Desizns.  

Nowadays everyone wants to make their website and to take their business forward. if you have the best website with good graphics then your website should definitely go high. If you have a business and looking for a website or any other web service then here we at Smart desizns provide you best services at affordable prices.  My company is fully IT Company with more than 30+ employee. We have a team of experts those are fully talented with latest techniques and handle any type of project in a timely manner.  Smart Desizns has a growing list of over 600+ satisfied clients, delivering successfully projects giving innovative solutions not just in India, but the world over. We always happy to say, we feel the success every day because of the Smart Desizns experts in execution planning with website design and digital marketing. Smart Desizns work for the client’s satisfaction. we always stand with you to grow your business organically. We shall do all the works for an unbelievable cost! While you work with us you feel, we are in right place and the right time. We focus on offering revolutionary web solutions and online marketing services to small and mid-sized businesses. 

Re: Updating an account password via Web Service API?

$
0
0
by Dorel Manolescu.  

Hi

From the web-services documentation under yoursite/admin/webservice/documentation.php

Check:

core_user_update_users 

Parameters:

list of ( 
object {
id int //ID of the user
username string Optional//Username policy is defined in Moodle security config.
password string Optional//Plain text password consisting of any characters
firstname string Optional//The first name(s) of the user
Regards



Web service is not available (it doesn't exist or might be disabled)

$
0
0
by Nilesh Pathade (eNyota Learning Pvt Ltd Pune).  

I am using Moodle 3.3.3. 

I am not using any web service for my moodle. And it's showing me "Web service is not available (it doesn't exist or might be disabled)"  

1. Login with admin user

2. Clicking some links and work on some pages...

3. By mistake my chrome Browser close by clicking X .

4. I restart chrome browser and restore my all tabs.

5. Moodle showing me : Web service is not available (it doesn't exist or might be disabled)


Please help me out.

core_user_get_users / core_user_create_users "Access Control Exception"

$
0
0
by Chuck Yocum.  

Hello,


My name is Chuck Yocum, I am the Support Manager at Spatial Business Systems with 20 years of experience writing system integration tools.

I am currently writing an integration between Zendesk and Moodle user account managment.

In Zendesk an agent can select a bunch of fields and this will create the match Moodle account if need be.

I have written a .Net C# api wrapper to call the different Moodle functions as I wish.    My api has no issue getting the course information but I can't get the user functions to work.  


I got tired of trying to find the right security sessions so I have created the latest token as the Admin user to be sure what was going on.


Any suggestions?  

I get the error for example when i use this code posted on another discussion. https://moodle.org/mod/forum/discuss.php?d=210866


Function List in Web Service Test Client not showing everything

$
0
0
by Chuck Yocum.  

When I am in my Web Service Test Client it is only showing 3 functions.

core_course_create_categories

core_course_delete_categories

core_course_update_categories


This may also explain why my other functions don't work in the api?

Re: core_user_get_users / core_user_create_users "Access Control Exception"

$
0
0
by Chuck Yocum.  

I figured this out.

It was the web service authentation setting

core_user_create_users custom fields not being set

$
0
0
by Chuck Yocum.  

I am able to create a user using this string.

http://xxx.com/webservice/rest/server.php?wstoken=xxx&wsfunction=core_user_create_users&moodlewsrestformat=json&users[0][username]=chuck.yocum@spatialbiz.com&users[0][password]=StrokeM!26&users[0][firstname]=Chuck&users[0][lastname]=Yocum&users[0][email]=chuck.yocum@xxx.com&users[0][customfields][0][type]=ZENDESK_ID&users[0][customfields][0][value]=181818181459&users[0][customfields][1][type]=ORG_SHORT_NAME&users[0][customfields][1][value]=SBS


My custom fields are not being set!!  Anyone see anything wrong with those last two parameters.

restrict user enrolment via Rest API

$
0
0
by Sebastian Ziegler.  

Hello,

I develop a tool to create courses depending on an excel file. Creating and updating a course works well now I want to restrict the enrolment of some course to a start date and end date and much more important limit the number of users that can enrol to a course. 

I didn't find an API call to do this, can anyone help.


Greets

Sebastian

Re: Web service URL and parameters

$
0
0
by Lawrence Lagerlof.  

Tested on Moodle 3.4.2

function: core_group_get_group_members

Example:

http://YOUR_SERVER/moodle/webservice/rest/server.php?wstoken=YOUR_TOKEN&moodlewsrestformat=json&wsfunction=core_group_get_group_members&groupids[0]=1


Retrieve group members with their roles

$
0
0
by Lawrence Lagerlof.  

The situation:

We have the function core_group_get_group_members to return the members of some group, and this function returns the members' IDs. After this I am doing a second request to get their roles using the core_user_get_course_user_profiles function.

The question:

Do we have some webservice function to return the users of a group AND their roles, so I don't need make two requests?

Thank you.

Re: Get user token in SSO environment

$
0
0
by Peter Spicer.  

Doing this is really difficult depending on the SSO environment you're doing it with.

There is a tracker item for it - https://tracker.moodle.org/browse/MDL-29583 - attached is a patch that makes webservices work like this for Shibboleth (at least for most Shibboleth installs!), though it wouldn't be particularly hard to adapt it for other SSO flavours where the webservice user has to go off and essentially log in behind the scenes.

Απάντηση: Web service is not available (it doesn't exist or might be disabled)

$
0
0
by Victoria Tsolidou.  

Hi,


I am facing exactly the same issue with Moodle 3.5,  popups "Web service is not available (it doesn't exist or might be disabled)"are continuously appearing.


Any work arounds?


Thank you in advance.

Moodle API URL

$
0
0
by Doug Funnie.  

Hello,
We're trying to connect two different applications to our Moodle site: Zoom and Zoho. For Zoho, specifically, this is the data we need:

Moodle API URL: (ourwebsite)/webservice/rest/server.php

Can anyone explain this to me? What is the webservice? What is the rest (REST API?)? What is the server?

Thanks!

Re: core_user_create_users custom fields not being set

$
0
0
by Dorel Manolescu.  

Hi

Which moodle version are you using. It works for me with latest 3.5 moodle

Looking in the code there is support for custom fields in the web-service:

###

// Custom fields.
if (!empty($user['customfields'])) {
foreach ($user['customfields'] as $customfield) {
// Profile_save_data() saves profile file it's expecting a user with the correct id,
// and custom field to be named profile_field_"shortname".
$user["profile_field_".$customfield['type']] = $customfield['value'];
}
profile_save_data((object) $user);
}

###

Just check that you have the correct syntax there. Please find attached a screen-shot with a postman request.

Any other questions let us know.

Regards


Viewing all 2361 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>