LMSouq
moodle-core Open

what is the use privatetoken in Moodle REST API response?

US
user3031108
1 month ago
3 views
Problem Description
I am using Moodle core REST API and I am following [this Stackoverflow][1] answer for my login request. login end-point is working successfully. API Request $ curl -d username="fmcorz" -d password="$PASSWORD" 'https://moodle.org/login/token.php?service=moodle_mobile_app' Response { "token":"SNIPTOKEN", "privatetoken":"SNIPPRIVATE" } I am using token to get User ID and other stuff. But I want to know what is the main purpose of privatetoken? according to my understanding this will use if moodle installation is on **Https** and "token" will we used when we use **http** but not sure as I have only **http** based server please help to understand this so I can choose best available token to implement Moodle REST API. thanks. [1]: https://stackoverflow.com/questions/44652206/getting-information-from-the-moodle-api-as-a-student

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base