T
T
Tenebrius2021-09-21 11:11:33
API
Tenebrius, 2021-09-21 11:11:33

How to properly use wall.post in vk api?

I 'm eager to use the wall.post method , they write, you need a user access key from the Standalone application.

Ok, I registered another application. Got id, secret, configured URL.

I'm still trying to get an access key with which to use the method. I'm trying to get through Implict Flow , the first step works. I make a query like

https://oauth.vk.com/authorize?client_id=000000&redirect_uri=https://mygreatsite.ru&display=page&scope=wall,photos,video,offline,docs,groups&response_type=token&state=123
(ID and url are normal)

it works (but only in incognito mode, if it is already authorized in VK, it sends it to the forest), I fill in the login / password, I say yes, I want to give all the listed rights, an address like
https://mygreatsite.ru/#access_token=megatoken666&expires_in=0&user_id=0000&state=123


Those. a token with a non-expiring expiration date is generated.

I go to the second step , I
form a url like
https://oauth.vk.com/access_token?client_id=00000&client_secret=niskazhu&code=megatoken666&redirect_uri=https://mygreatsite.ru


and in response to this he swears:
{"error":"invalid_grant","error_description":"Code is invalid or expired."}
I tried it under different users, the result is the same.

What can be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WolfInChains, 2021-09-21
@Tenebrius

You can get a Kate Mobile token for example.

https://api.vk.com/method/wall.post?owner_id=айди_владельца_поста&post_id=айди_поста&message=сообщение&access_token=TOKEN&v=V

A
ABCquestion, 2022-01-07
@ABCquestion

WolfInChains , but how to take tracks from a group in VK randomly and add to a post?
How do you attach a track to a recording?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question