REST-API: Create new users via auth_email_signup_user

Re: REST-API: Create new users via auth_email_signup_user

by Andi Sobandi -
Number of replies: 2

Hi, Kevin Zapp

I'm using auth_email_signup but I can't add custom profile fields

I look and write code like API Documentation but it doesn't work

moodlewsrestformat:json
wstoken:xxxxxxxxxxxxxxxxxxxxxxxx
wsfunction:auth_email_signup_user
username:johndoe
firstname:John
lastname:Doe
password:xxxxxxx
email:johndoe@mail.local
city:London
country:EN
customprofilefields[0][type]:foo
customprofilefields[0][name]:Foo
customprofilefields[0][value]:Sample

I'm using moodle 3.9 and I'm using Postman for testing

I'm getting an error message

{"exception":"invalid_parameter_exception","errorcode":"invalidparameter","message":"Invalid parameter value detected (Invalid fieldFoo)","debuginfo":"Invalid fieldFoo"}

Could you please help me, what is the correct way to add custom profile fields in auth_email_signup

Thank You!

In reply to Andi Sobandi

Ri: Re: REST-API: Create new users via auth_email_signup_user

by Alan Quaino -
I'm also stuck in this situation. Everything is correct and I followed the Moodle API documentation. Also using Postman, and I'm getting the same error.
Any help or solution?

Thanks