Hello! I am writing my client for vk. I study what and how it works ... I can not understand how to send a request for authorization. they have vk.com/dev/methods. But I am already poking for half a day, FIG know what's wrong. I can not log in ... The best I could find: https://oauth.vk.com/token?grant_type=password&client_id=1914441&...=***&username=***&password=***

But here you need the application id, something else ...
Who can explain what they need to send there for authorization? Surely not like this: vk.com/login=% pass = - everything! What is wise?

  • one
    @Alerr that's because half the sites are full of holes like “wise men” like you. There is the concept of OAuth , vk like any normal site uses this ideology. True, the phrase vk == normal site - makes me laugh homemade - Barmaley
  • The question is how to send (with a line) an authorization request? - Alerr

2 answers 2

register the application https://vk.com/editapp?act=create

Log in https://vk.com/dev/authentication

get the server address for downloading the image https://vk.com/dev/photos.getWallUploadServer

Save the uploaded photo https://vk.com/dev/photos.saveWallPhoto

post on https://vk.com/dev/wall.post

  • Thank you) clearly and on the topic). The question is, is it necessary to create \ register the application? No application in any way? Can other people install this application and will it perform the same functions inherent in it? - Alerr
  • Yes. since without it you will not be able to work with the API. And working directly, bypassing the API, seems to be prohibited by site rules. - naym pm
  • Everything worked out!!! Only in the browser access_tocken appears in the address bar, and programmatically I can’t catch it ... Some garbage comes that does not contain token token ( - Alerr
  • There are 2 options for obtaining a token, 1 directly (parameter response_type = token in the URL vk.com/dev/auth_mobile ), 2 - through the code ( vk.com/dev/auth_sites ) - naym

Read the instructions in the special section of this site.

https://vk.com/dev

  • I read, I understand that you need to write \ create your application in the VC and somehow dock with it ... But I don’t need it. I need to login, transfer the image file and display a message on the page with this image. - Alerr
  • @Alerr, read carefully the article en.wikipedia.org/wiki/OAuth - PaulD
  • @Alerr, learn to read. - Sergey