mhmdsalah
Forum Replies Created
-
Thanks @dino.
regard the first configuration:
“Reach to balance: Takes into account the user’s total point balance. When you reach the amount that has been configured in the event you would earn the achievement.”
Can you point me to how to do it?
Hi Dioni Sánchez
I’m confused. what is the purpose of gamipress-user-earning endpoint then? what if I don’t use it?Thank you for your fast response.
How to setup the first one? I think to setup the second one by using the “Minimum Points Required” option when making the achievement.
The problem I have is when I set the minimum points required for an achievement to 10 for example, and I then bulk award the user by points more or equal to this achievement he doesn’t get the achievement.simply the curl should be like this:
curl "https://lms.local/wp-json/llms/v1/students/2/enrollments/66" \ -X POST \ -H "authorization: Basic Y2tfYmFkNzg1ODg4NDEyNTJmYzU5OTI0MzQ0NWY0YzVmZTcwYzlkMjE1OTpjc184ZDNkYTIzNGIwNGY3MWEyN2QwYWI3MGQ0YjUxN2M2Y2JjNDNmY2Zj"
Yes, I did.
Thank you for your response, I found the problem which was to request my local using HTTPS, not HTTP.
I believe lifter-lms shouldn’t enforce https in development or at least the response message should be clear about the problem with the https connections.- This reply was modified 8 months, 1 week ago by mhmdsalah.
This is the curl:
curl "https://lms.local/wp-json/llms/v1/students/2/enrollments/66" \ -X POST \ -H "authorization: Basic Y2tfYmFkNzg1ODg4NDEyNTJmYzU5OTI0MzQ0NWY0YzVmZTcwYzlkMjE1OTpjc184ZDNkYTIzNGIwNGY3MWEyN2QwYWI3MGQ0YjUxN2M2Y2JjNDNmY2Zj"
Note, I tried using the
Header Authentication
also it didn’t work:private static api: AxiosInstance = axios.create({ baseURL: process.env.NEXT_PUBLIC_WORDPRESS_URL +
/wp-json/llms/v1
, headers: { "X-LLMS-CONSUMER-KEY": process.env.LIFTER_LMS_CONSUMER_KEY as string, "X-LLMS-CONSUMER-SECRET": process.env .LIFTER_LMS_CONSUMER_SECRET as string, }, });Forum: Plugins
In reply to: [Da Reactions] Question about the plugin licenseHello Daniele Alessandra, thanks for your response.
Currently, the Da Reaction plugin identifies the user by User ID (if they are logged in) or by a token (stored in the user’s cookies).
My use case is a little different. I’m developing a Headless WordPress App with Next.js, and I have a .NET backend that contains all our user data. So, my stack is as follows:
- Next.js: as the frontend application.
- .NET: as my backend with a database containing all my users’ info.
- WordPress: as the content management system for content writers to write articles.
I want to identify users when they like a post, but I don’t want to log my users into WordPress. So, according to the plugin’s current implementation, all my users are anonymous.
My solution to identify my users was this: passing the User ID from my Next.js server to the Da Reaction Endpoint.
To prevent unauthorized actions, I will add some kind of API Key that is only known to the WordPress backend and Next.js, and pass it as a header with my request along with the User ID (after verifying the user) using my Next.js server.
I’m new to WordPress and the Headless approach. What do you think of this? Also, I’m not completely sure if the Da Reaction package plays nicely with Headless WordPress. I just played with it.