Skip to content

photos.getWallUploadServer returns error 27 with Community Token despite photos permission being granted #242

Description

@dpepelyaev

Problem

We are getting error 27 (Group authorization failed: method is unavailable with group auth) when calling photos.getWallUploadServer using a Community Token, even though the token has the photos permission explicitly enabled.

Steps to Reproduce

  1. Create a Community Token for a VK group with the following permissions enabled:
    • photos
    • wall
    • messages
    • manage
  2. Call photos.getWallUploadServer with group_id parameter:
GET https://api.vk.com/method/photos.getWallUploadServer?group_id=212979992&access_token={COMMUNITY_TOKEN}&v=5.131

Actual Result

{
  "error": {
    "error_code": 27,
    "error_msg": "Group authorization failed: method is unavailable with group auth."
  }
}

Token Permissions Check

Verified via groups.getTokenPermissions:

{
  "mask": 134623237,
  "permissions": [
    { "name": "photos", "setting": 4 },
    { "name": "wall", "setting": 8192 },
    { "name": "manage", "setting": 262144 }
  ]
}

As you can see, photos permission IS present in the token, but the method still returns error 27.

Expected Result

The method should return a valid upload server URL when called with a Community Token that has photos permission enabled — just like it works when using a User Token.

What Works vs What Does Not

Method Community Token User Token
wall.post (text only) ✅ Works ✅ Works
photos.getWallUploadServer ❌ Error 27 ✅ Works
photos.saveWallPhoto ❌ Error 27 (presumed) ✅ Works

Context

We are building an automation tool that publishes posts with images to a VK community wall. The Community Token approach is preferred for security reasons (no need to expose user credentials), but the inability to upload photos makes it incomplete for our use case.

Questions

  1. Is this restriction intentional? The documentation for photos.getWallUploadServer does not explicitly state that it requires a User Token.
  2. If this is by design, could you please update the API documentation to clarify which token type is required?
  3. Is there any alternative approach to upload photos to a community wall using only a Community Token?

API Version

v=5.131

Additional Info

  • Group ID: 212979992
  • Application ID: 54459001
  • Token type: Community Token (group auth)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions