Skip to content

Instantly share code, notes, and snippets.

@diem1
Created March 11, 2016 08:34
Show Gist options
  • Save diem1/0ccb69d19929edef8774 to your computer and use it in GitHub Desktop.
Save diem1/0ccb69d19929edef8774 to your computer and use it in GitHub Desktop.
NodeJS VK API Get Access token for app
clientId = '' # ID додатка
clientSecret = '' # Захисний ключ
vkRequest = require 'request-json'
client = vkRequest.createClient 'https://oauth.vk.com/'
params = 'access_token' +
'?client_id=' + clientId +
'&client_secret=' + clientSecret +
'&grant_type=client_credentials'
data =
title: 'title'
content: 'content'
console.log 'https://oauth.vk.com/' + params
client.get params, data, (err, res, body) ->
console.log body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment