Hello,
I was trying to write a way for one of my modules to post to a web service built in the 6.2 framework. But, I kept getting an unauthorized (401) response. I think this is because I need to send the request verification token along with my posted data. However, there's no way to generate it through the API - at least not that I can find.
In DotNetNuke.Framework.ServicesFramework, there is a private function that creates an HTML helper from MVC to get the token, but, because it's private, it only works through a process that creates a block to embed in page as a hidden field. I don't think this works for creating a webrequest in code.
So, first, does anybody know if I'm missing something - is there some way to get the RequestVerificationToken? Second, if not, can you make a simple function or property that is exposed through the API that will report the current token? From what I can tell, it would be easy enough to do in that ServicesFramework class... Everything is there, it's just not exposed.
Thanks,
Mike