4

I'm trying to implement VK API, so thanks OAuth code I get a token and just add this scope offline,audio and now doing this request:

https://api.vk.com/method/account.getInfo?access_token=XXXXX&v=5.62

And go this in return:

  {
  "error": {
    "error_code": 15,
    "error_msg": "Access denied: no access to call this method",
    "request_params": [
      {
        "key": "oauth",
        "value": "1"
      },
      {
        "key": "method",
        "value": "account.getInfo"
      },
      {
        "key": "v",
        "value": "5.62"
      }
    ]
  }
}

Why, there's a scope for this too?

Nakilon
  • 34,866
  • 14
  • 107
  • 142
blackarcanis
  • 542
  • 1
  • 4
  • 23

2 Answers2

5

Your application isn't Standalone type or you received access token not via Implicit Flow scheme.

Note: you should set parameter redirect_uri=https://oauth.vk.com/blank.html to get access token without limitations. In other ways access token will be limited to call methods which available only for standalone applications.

Petr Flaks
  • 543
  • 2
  • 7
  • 25
1

you also need to place scope=messages in authorization method

GetToken.Navigate("https://oauth.vk.com/authorize?client_id="+ VkAPI.__APPID + "&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=messages&response_type=token&v=5.87&revoke=1");

Danil
  • 701
  • 8
  • 7