I'm trying to retrieve some information from the LiveID API but am getting the error:
The provided request does not include an access token. An access token is
required in order to request this resource.
the code is relatively simple; I'm including the library, calling the initialiser with the nameidentifier
claim I get from WIF and then requesting the me path.
from the error message I surmise I failed to provide an access token... but wouldn't my app have this already since I successfully retrieved the claim?
here's my code:
<script src="https://js.live.net/v5.0/wl.js" type="text/javascript"></script>
<script type="text/javascript">
WL.init({ client_id: 'O0UpnnhoiFljBJAtTxhVliu4qtbUWoEVxdgfK7SBR+M=' });
WL.api({ path: "me", method: "GET" }, function (response) {
// response.error.message
});
* update *
it occurred to me perhaps I need to log into the system so I now have:
WL.init({ client_id: 'O0UpnnhoiFljBJAtTxhVliu4qtbUWoEVxdgfK7SBR+M=' });
WL.login();
WL.api({ path: "me", method: "GET" }, function (response) {
but same error...