Last active
December 19, 2015 07:19
-
-
Save m3talsmith/5917685 to your computer and use it in GitHub Desktop.
gapitoken: token undefined issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('util'); | |
var GAPI = require('gapitoken'); | |
var gapi = new GAPI({ | |
iss: '1074036960964-p8827i23hcprb8dr959uh2a6irk1jgfe@developer.gserviceaccount.com', | |
scope: 'https://storage.googleapis.com', | |
keyFile: './config/google-key.pem' | |
}, function(error){ | |
console.log(error); | |
console.log(gapi); | |
gapi.getToken(function(error, token){ | |
console.log(error); | |
console.log(token); | |
console.log(gapi); | |
}); | |
}); | |
console.log(gapi); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN RSA PRIVATE KEY----- | |
MIICXQIBAAKBgQDZ7eUSyT7H4KoKqbFiIJks+XxO+bZaUvKnlQsVhGgY7J/K92WG | |
qkdeT6muf7cmjh/x+d4BH3LQenPvVpPwNuEIEZkCrNMYQ9vD3MazyOYpAAwd9QhS | |
xJaCRzc8pj1J4vpGvacFzPga0nhb5lB2H9vV6xWDFr7qNZ0scZspI2ECxQIDAQAB | |
AoGAPuGTvW3v/YBn0BfSpPu+9ukt4yPOaBWTCqPIxPaliruMB+aGluq/GQlnboBP | |
eoJ72Tg9xJksaddLaH3UxfUvzLm/cU5qkzphMG4kpctMsmiN75dFKMka7tRYAlls | |
WZB3EiUet45S61TyE3FtwjqaeRVx7P4zVtTaqhy2yrgdQsECQQD371Vydjy077hO | |
QUOErny6tOIfDI1znwVSDDBVN+zqA6NBv6eJroDnTqVXO78Dd1B+Y1bxXA3u+NVy | |
ePHInR95AkEA4QSwzcqEy4npgS95azMg0IE53r7uW/2G4I1gnE8MtZc3Qpmf/QUT | |
14qHwHpH00B83quyCIThau4bmeK7SCMurQJBAMkqARRL5tmPnuSvg07GHCGI3eb/ | |
Uk27ep+lkBm0tJ7ysKWKES9ezOvgHbr3mPYA+uhxRXuziwKYFuc4RkTVZ1ECQQCy | |
I0+BK8HjjOPSBO5/wnNI/fT9dXQoWVZs8R+5vw8Vt4fk7s/stBdYPPBpnaS9BkGU | |
2qJQAjqet7AcLJYNbuTlAkACr0Kos1AT6Ox8BgbeTuDdKbBDxI2Wlb64NpaZ60Ql | |
ebrskPOZNmoC7baUKPlq4kzq3JztKweJ9V/Ej667The4 | |
-----END RSA PRIVATE KEY----- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the scope is incorrect, use https://www.googleapis.com/auth/devstorage.full_control