Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid token when POSTING Json data #12

Open
Milanw2 opened this issue May 15, 2017 · 2 comments
Open

Invalid token when POSTING Json data #12

Milanw2 opened this issue May 15, 2017 · 2 comments

Comments

@Milanw2
Copy link

Milanw2 commented May 15, 2017

I'm getting this error when I'm uploading users:

<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="moodle_exception">
<ERRORCODE>invalidtoken</ERRORCODE>
<MESSAGE>Invalid token - token not found</MESSAGE>
</EXCEPTION>

And this is my code:

function send_users_to_moodle(client, Json, count, x) {
    client.call({
        wsfunction: "core_user_create_users",
        method: "POST",
        args: {
            Json
        }
    }).then(function (info) {
        console.log(info);
    });
};
@Milanw2 Milanw2 closed this as completed May 15, 2017
@Milanw2 Milanw2 reopened this May 15, 2017
@Milanw2
Copy link
Author

Milanw2 commented May 15, 2017

This happens when I'm trying to add more then 200+- users and when there are errors in the data, like null. But it doesn't give me an error about that, but about the invalid token. Please help. thanks in advance

@mudrd8mz
Copy link
Owner

Are you able to monitor the server side too? To see if/what error was thrown in Moodle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants