Answer the question
In order to leave comments, you need to log in
How to upload an avatar for a VK API group?
1. I get the URL for uploading using - photos.getOwnerPhotoUploadServer (I pass the identifier with the -{groupID} sign)
2. I upload the image using the curl to the received URL
3. I pass the received parameters in step 2 to the - photos.saveOwnerPhoto method, then
the avatar changes, but not for the group, but for the user under which I perform requests. What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
Because when you call photos.getOwnerPhotoUploadServer you pass the owner_id of your user and not the group, you need to pass the group ID with a minus sign
Обратите внимание, идентификатор сообщества в параметре owner_id необходимо указывать со знаком "-" — например, owner_id=-1 соответствует идентификатору сообщества ВКонтакте API (club1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question