ankitsam / office365-api-php-client

The Office 365 RESTful API PHP Client Library enables you to work with Calendar, Contact and Mail that uses OAuth2 for authorization.
Apache License 2.0
19 stars 13 forks source link

Office365 and Onenote API #2

Closed NerxhanMusliu closed 7 years ago

NerxhanMusliu commented 9 years ago

I'm trying to use this library to communicate with ONENOTE API, but always get the 401 Unauthorized code. I don't know what's wrong with accessToken, when i check the scope: stdClass Object(

[token_type] => Bearer
[expires_in] => 3599
[scope] => Contacts.Read Mail.Read User.Read User.Read.All
[expires_on] => 1444251788
[not_before] => 1444247888
[resource] => https://graph.microsoft.com/
[access_token] => access_token here
[refresh_token] => refresh_token here
[id_token] => id_token here

) I can't see onenote scope on list. I also open an issue on stackoverflow: http://stackoverflow.com/questions/33002134/office365-api-onenote-api-included

Thanks.

NerxhanMusliu commented 9 years ago

Resolved: The problem was at [resource].

To communicate with onenote we need to use [resource] => https://onenote.com/

Thanks