Forum Discussion
Great! create an endpoint in your community and expose it to your parent website. This endpoint should take the user id as its parameter when you call this from your .com. There you go, you are now exposing the notifications from lithiums endpoint to your dot com.
Workflow:
www.yourcommunity.com Endpoint, which will exist on a URL as
www.yourcommunity.com/plugins/custom/yourcommunity/yourcommunityID/your_endpoint_name?user_id=72
www.yoursite.com will pass the parameter user_id to this endpoint and you can then use this on your .com
Conclusion:
Steps to Create endpoints:
create a endpoint:
endpoint name: "lthium_notification"
Put this inside endpoint:
www.community.as.play.com
www.community.as.play.com/plugins/custom/community.as.play.com/yourcommunityID/lthium_notification?${user.id}
www.as.com
Concern:
Where do I get communityID?
Please correct me if Iam wrong some where. Folowing is the reference for names:
1. My community name:
www.community.as.play.com
2. My endpoints name:
lthium_notification
3. Parent site url:
www.as.com
Regards,
Bhupen
- VarunGrazitti11 years agoBossYou don't need to give the community ID in endpoint.
- bhupen11 years agoAdvisor
VarunGrazitti Thanks.
I wanted to confirm about syntax, Is it okay or something wrong in it. Thats why I mention everything onabove comment.
www.community.as.play.com
www.community.as.play.com/plugins/custom/community.as.play.com/lthium_notification?${user.id}
www.as.comPlease correct me if Iam wrong some where. Folowing is the reference for names:
1. My community name:
www.community.as.play.com
2. My endpoints name:
lthium_notification
3. Parent site url:
www.as.comSpcially with this line:
www.community.as.play.com/plugins/custom/community.as.play.com/lthium_notification?${user.id}
Regards,
Bhupen
- bhupen11 years agoAdvisor
VarunGrazitti Thanks for your priecious time and help. Although I got alternate solution for this. I have used this api to achive this functionality.
/restapi/vc/users/login/bhupen/id
- Claudius10 years agoBoss
And just to finish up the open questions from this thread:
bhupen wrote:
Conclusion:
Steps to Create endpoints:
create a endpoint:
endpoint name: "lthium_notification"
Put this inside endpoint:
www.community.as.play.com
www.community.as.play.com/plugins/custom/community.as.play.com/yourcommunityID/lthium_notification?${user.id}
www.as.com
Concern:
Where do I get communityID?Take a look at the endpoints documentation KB article. This actually explains how you easily obtain the endpoint URL from the endpoints page in Lithium Studio. Your community ID is e.g. the first part of your lithium stage server URL and you should be quite familiar with it.
For embedding notifications be aware that there are currently a few limitations, e.g. you cannot pull unread notifications yet.
Related Content
- 11 years ago
- 7 months ago