GithubHelp home page GithubHelp logo

node-vk-api's People

Contributors

2byte avatar greenkeeperio-bot avatar v12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

2byte boffka

node-vk-api's Issues

login problem

Just tried to login with this code:

import {vkDirty} from '../utils/native'

export function login(name, pass) {
  const credentials = {
    client_id: 5120154,
    login:        name,
    pass:         pass,
    tokenStorage: new vkDirty.TokenStorage()
  }
  vkDirty.token(credentials)
  .then(token => console.log(token))
  .catch(err => console.log('Unnable to auth: ' + err))
}

And got this error

Unnable to auth: ValidationError: Invalid parameter {
  "client_id" �[31m[1]�[0m: null
}
�[31m
[1] "client_id" must be a number�[0m

wall.post access denied error

I created standalone app in vk and try this code

const credentials = {
        client_id:    client_id,
        login:        'login',
        pass:         'pass',
        phone:        'phone',
        tokenStorage: new vk.TokenStorage()
    };
vk.token(credentials)
        .then(function (access_token) {
            console.log('Successfully authenticated / access_token:', access_token);
            var api = vk.api(access_token);
            return api('wall.post', { message: 'test message' })
                    .then(info => console.log(info))
            .catch(err => console.error('Unable to complete request', err));
        })
        .catch(err => console.error('Unable to authenticate', err));

But always I get an error:

error_code: 15,
error_msg: 'Access denied: no access to call this method' 

Login Problem

Why do I always get this error message?

Error: Invalid URI "/login.php?act=security_check&to=&hash=a936e4547b470c22b7&api_hash=5529f59f1723a4d1a1"]
Error: Invalid URI "/login.php?act=security_check&to=&hash=a936e4547b470c22b7&api_hash=5529f59f1723a4d1a1"
at Request.init (/path/node_modules/vk-dirty-api/node_modules/request/request.js:286:31)
at new Request (/path/node_modules/vk-dirty-api/node_modules/request/request.js:140:8)
at request (/path/node_modules/vk-dirty-api/node_modules/request/index.js:55:10)
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12
at /path/node_modules/vk-dirty-api/node_modules/request/index.js:101:12

can't catch error when post to login.vk.com

code 138

getAllowLink(body, function (err, link) {
    if (err)
        return errorCallback(err);

    request({
        url:    link,
        method: 'POST'
    }, function (err, res) {
        if(err){
            // !!! what will happen todo 
        }

        var access_token = /access_token=([a-f0-9]+)/.exec(res.request.uri.hash);
...
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.