Forum Discussion
Tarun
Maven
Hi Inactive User ,
You can look to use the subscriptions API over here to subscribe/unsubscribe a user to a label:
curl -X POST \
https://[COMMUNITY DOMAIN]/api/2.0/subscriptions \
-H 'content-type: application/json' \
-H 'li-api-session-key: [SESSION KEY]' \
-d '{
"data":{
"type":"subscription",
"target":{
"type":"label",
"id":"Mexico"
},
"board":{
"id":"vacationBlog"
}
}
}'
Please Give Kudos if you find this post useful and also mark this as Accepted Solution if this is the required solution.
Regards
Tarun Kumar
Inactive User
5 years agoThank you. Any thoughts on how I could create a link on a page with that script? I'm at a loss of where to use curl on a Community page. Component? Endpoint? Is it even valid in freemarker? Etc.
Related Content
- 12 months ago
- 2 years ago