Possible for admins to create bookmarks for users?

Is it possible to create bookmarks for other users?

I’m imagining creating a new user’s first bookmark to a particular topic we write to help new users get up to speed.

Oh! I just realized I can “impersonate” other users. So at the very least, I can go in as that user and create a bookmark for them.

So I have a solution. But I’m wondering if there’s a more elegant way?

You could create them with the API or make a plugin that would do it when the account was created

I’m using hosted Discourse, so I suspect I couldn’t install a custom plugin.

2 Likes

That would depend on your budget. :slight_smile:

But one could probably come up with an API script that would get users from the previous day and add bookmarks for them.

hmmm, this is making me want to look at my membership/SSO provider’s docs carefully (I’m using Memberful.com) I wonder if there’s a web hook I can have it call on new user registration… maybe I can connect that the Discourse.

Can someone point me to the API/webhook docs for Discourse that would create a bookmark for a user?

I’ve looked through the ReDoc site, thanks to Discourse API Documentation

I see there’s an obvious API endpoint for creating a bookmark, /t/{id}/bookmark

If I call that as an API user who is an admin, is there a way I can specify that I want to create a bookmark for a specific user?

( The goal here is to call this API soon after a new user is created (by the SSO provider) to inject a specific bookmark for that new user. )

2 Likes

I’m pretty sure you need to call that endpoint with the username of the user, but use the “All Users” api key.

3 Likes

Rats, I was afraid of that.

All I have on the SSO provider’s side is the ability to specify a webhook URL to call upon account creation. I’d have to build a ‘glue’ web site that received their webhook call, looked in their payload for the username it chose/created, and then made the Discourse API call with the one parameter being all that’s different.

Oh. That makes me wonder if I can make something like IFTTT do that…

…yeup. Looks like the IFTTT Platform service is exactly for this.

*tosses idea on huge pile of things to hire someone to do*

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.