using above url i am able to get all tag groups data but when i hit same url in private mode of browser. it throws me error " No route matches [GET] “/tag_groups.json”" .
how can i fetch the tag groups info using above url without logged in ?
You will need to make an authenticated API request. Have a look at the Authentication section of https://docs.discourse.org/ for details about how to do that.
If Simon’s answer isn’t the one you’re looking for, it might help for you to back up and describe your problem (why do you need to get the tag groups?) rather than your proposed solution to it.