Skip to content

dimon4ezzz/vk-audiomessage-sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VK Audiomessage Sender

This tiny script helps you send audio message to person at VK.

Attention! Your application have to have direct authorization ability!

Setup

You should set up this Auth fields in call:

  1. ClientID — your application has client ID
  2. ClientSecret — your application has client secret key; you have to have direct authorization ability!
  3. Username — your username: phone or email
  4. Password — your password in plain text 🤷‍♂️
  5. Filename — your .ogg filename (you should use mono,16KHz,16Kb/s audio) without path
  6. Recipient — recipient user ID

You can set up this Setup fields in call:

  1. SaveOauth — should the application save VK token to file
  2. OauthFile — custom filename for token; otherwise file has name vk-token (see defaultOauthFile)

Usage

This script was tested on Go 1.14. You have to use application with enabled direct authorizaion.

Example (w/o token saving)

package main

import sender "github.com/dimon4ezzz/vk-audiomessage-sender"

func main() {
    auth := sender.Auth{
        ClientID: 111222,
        ClientSecret: "Z6jB1ka2uinYsHhHbZxr",
        Username: "personal@mail.com",
        Password: "dolphins42",
        Filename: "audiomessage.ogg",
        Recipient: 11235813
    }
    sender.Send(auth, Setup{})
}

If needed (2fa activated): wait for 2fa code prompt and type this code.

At the end of this script you will see link to your message at full VK Web version.

Token is saved with AES, encrypted with your password.