Discourse now supports composing a new (pre-filled) personal message via URL!
To compose a new pre-filled message, modify URL params like this:
This will open a composer window pre-filled with username, title and body.
Breaking down the link / URL to show the available options, we have:
- the base URL / link:
?URL operator to add the different options
- the username of the community member you want to message:
&URL operator to include multiple options
- the message title:
&URL operator again to include multiple options
- the body of the message:
Try it out live on
You can also compose a pre-filled message for a group via URL:
Notice the groupname param in above URL, this means that you want to create a new pre-filled message for a group (as opposed to
username for composing a message for user).
- You don’t need to fill in all of the params. For, example, any of these would work:
https://meta.discourse.org/new-message https://meta.discourse.org/new-message?username= https://meta.discourse.org/new-message?title=foo&body=bar https://meta.discourse.org/new-message?groupname=
- You can add line spaces using the %0A and %0A%0D codes to give some structure to the body of the message:
- If you have SSO, you can llink to yourdomain.com/session/sso and then set the return path to create the private message. If the user is already logged in they will be redirected automatically to the url supplied by the return path. If they aren’t logged in they will be taken to the sso login page and then redirected to the return path url. The return path will need to be url encoded.
- Use the pre-filled URL to compose a message to multiple users or multiple groups.
- Use the pre-filled URL to open the composer in a user’s summary page.
- Using email instedad of the username to pre-fill a personal message.
Want to compose a pre-filled topic instead? See: How to create a new topic link with pre-filled information