Vimeo-api response body empty












0















I'm using vimeo-api for node.js from here https://github.com/vimeo/vimeo.js

I want to do simple video search request, but while following example and doing everything almost identical, I stumbled upon some problems



Code:



, Vimeo = require('vimeo-api').Vimeo;

var lib = new Vimeo(*myapp id*, *my app secret*);

lib.generateClientCredentials('public', function (err, access_token) {

if (err) {
throw err;
}
console.log('credentials generated')

var token = access_token.access_token;
console.log(token);
lib.access_token = *token, generated in my app authentication tab on vimeo developer()*;
var scopes = access_token.scope;
console.log(scopes);
});

client.on('vimeocall', function (qinput) {
console.log('got vimeo call');
lib.request(/*options*/{
// This is the path for the videos contained within the staff picks channels
path: '/videos',
// This adds the parameters to request page two, and 10 items per page
query: {
query: qinput,
per_page: 10
}
}, /*callback*/function (error, body, status_code, headers) {
if (error) {
console.log('error');
console.log(error);
} else {
console.log('body');
console.log(body);
}

console.log('status code');
console.log(status_code);
console.log('headers');
console.log(headers);
});
})


So, first problem is, that console logs in generateClientCredentials prints, that token and scopes is undefind;

Then I manually put there pregenerated token, to test it further.

Second problem - callback from lib.request logs status code 200, headers with data, but embty body - just body {}.

Testing on localhost.

Where I messed up?



Update:
headers prompts:



{ date: 'Thu, 16 Oct 2014 15:48:44 GMT',
server: 'Apache',
'set-cookie': [ 'vuid=1338193217.1277890698; expires=Sun, 13-Oct-2024 15:48:44
GMT; path=/; domain=.vimeo.com' ],
vary: 'Accept,Vimeo-Client-Id,Accept-Encoding',
'cache-control': 'no-cache, max-age=315360000',
expires: 'Sun, 13 Oct 2024 15:48:44 GMT',
'keep-alive': 'timeout=100, max=88',
connection: 'Keep-Alive',
'transfer-encoding': 'chunked',
'content-type': 'application/vnd.vimeo.video+json',
via: '1.1 dca1-10' }









share|improve this question




















  • 1





    The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

    – Dashron
    Oct 16 '14 at 15:38











  • Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

    – Max Yari
    Oct 16 '14 at 15:49













  • Yet waiting for some useful info

    – Max Yari
    Oct 20 '14 at 11:39






  • 2





    Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

    – Dashron
    Oct 20 '14 at 16:35








  • 1





    App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

    – Dashron
    Oct 22 '14 at 17:03
















0















I'm using vimeo-api for node.js from here https://github.com/vimeo/vimeo.js

I want to do simple video search request, but while following example and doing everything almost identical, I stumbled upon some problems



Code:



, Vimeo = require('vimeo-api').Vimeo;

var lib = new Vimeo(*myapp id*, *my app secret*);

lib.generateClientCredentials('public', function (err, access_token) {

if (err) {
throw err;
}
console.log('credentials generated')

var token = access_token.access_token;
console.log(token);
lib.access_token = *token, generated in my app authentication tab on vimeo developer()*;
var scopes = access_token.scope;
console.log(scopes);
});

client.on('vimeocall', function (qinput) {
console.log('got vimeo call');
lib.request(/*options*/{
// This is the path for the videos contained within the staff picks channels
path: '/videos',
// This adds the parameters to request page two, and 10 items per page
query: {
query: qinput,
per_page: 10
}
}, /*callback*/function (error, body, status_code, headers) {
if (error) {
console.log('error');
console.log(error);
} else {
console.log('body');
console.log(body);
}

console.log('status code');
console.log(status_code);
console.log('headers');
console.log(headers);
});
})


So, first problem is, that console logs in generateClientCredentials prints, that token and scopes is undefind;

Then I manually put there pregenerated token, to test it further.

Second problem - callback from lib.request logs status code 200, headers with data, but embty body - just body {}.

Testing on localhost.

Where I messed up?



Update:
headers prompts:



{ date: 'Thu, 16 Oct 2014 15:48:44 GMT',
server: 'Apache',
'set-cookie': [ 'vuid=1338193217.1277890698; expires=Sun, 13-Oct-2024 15:48:44
GMT; path=/; domain=.vimeo.com' ],
vary: 'Accept,Vimeo-Client-Id,Accept-Encoding',
'cache-control': 'no-cache, max-age=315360000',
expires: 'Sun, 13 Oct 2024 15:48:44 GMT',
'keep-alive': 'timeout=100, max=88',
connection: 'Keep-Alive',
'transfer-encoding': 'chunked',
'content-type': 'application/vnd.vimeo.video+json',
via: '1.1 dca1-10' }









share|improve this question




















  • 1





    The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

    – Dashron
    Oct 16 '14 at 15:38











  • Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

    – Max Yari
    Oct 16 '14 at 15:49













  • Yet waiting for some useful info

    – Max Yari
    Oct 20 '14 at 11:39






  • 2





    Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

    – Dashron
    Oct 20 '14 at 16:35








  • 1





    App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

    – Dashron
    Oct 22 '14 at 17:03














0












0








0








I'm using vimeo-api for node.js from here https://github.com/vimeo/vimeo.js

I want to do simple video search request, but while following example and doing everything almost identical, I stumbled upon some problems



Code:



, Vimeo = require('vimeo-api').Vimeo;

var lib = new Vimeo(*myapp id*, *my app secret*);

lib.generateClientCredentials('public', function (err, access_token) {

if (err) {
throw err;
}
console.log('credentials generated')

var token = access_token.access_token;
console.log(token);
lib.access_token = *token, generated in my app authentication tab on vimeo developer()*;
var scopes = access_token.scope;
console.log(scopes);
});

client.on('vimeocall', function (qinput) {
console.log('got vimeo call');
lib.request(/*options*/{
// This is the path for the videos contained within the staff picks channels
path: '/videos',
// This adds the parameters to request page two, and 10 items per page
query: {
query: qinput,
per_page: 10
}
}, /*callback*/function (error, body, status_code, headers) {
if (error) {
console.log('error');
console.log(error);
} else {
console.log('body');
console.log(body);
}

console.log('status code');
console.log(status_code);
console.log('headers');
console.log(headers);
});
})


So, first problem is, that console logs in generateClientCredentials prints, that token and scopes is undefind;

Then I manually put there pregenerated token, to test it further.

Second problem - callback from lib.request logs status code 200, headers with data, but embty body - just body {}.

Testing on localhost.

Where I messed up?



Update:
headers prompts:



{ date: 'Thu, 16 Oct 2014 15:48:44 GMT',
server: 'Apache',
'set-cookie': [ 'vuid=1338193217.1277890698; expires=Sun, 13-Oct-2024 15:48:44
GMT; path=/; domain=.vimeo.com' ],
vary: 'Accept,Vimeo-Client-Id,Accept-Encoding',
'cache-control': 'no-cache, max-age=315360000',
expires: 'Sun, 13 Oct 2024 15:48:44 GMT',
'keep-alive': 'timeout=100, max=88',
connection: 'Keep-Alive',
'transfer-encoding': 'chunked',
'content-type': 'application/vnd.vimeo.video+json',
via: '1.1 dca1-10' }









share|improve this question
















I'm using vimeo-api for node.js from here https://github.com/vimeo/vimeo.js

I want to do simple video search request, but while following example and doing everything almost identical, I stumbled upon some problems



Code:



, Vimeo = require('vimeo-api').Vimeo;

var lib = new Vimeo(*myapp id*, *my app secret*);

lib.generateClientCredentials('public', function (err, access_token) {

if (err) {
throw err;
}
console.log('credentials generated')

var token = access_token.access_token;
console.log(token);
lib.access_token = *token, generated in my app authentication tab on vimeo developer()*;
var scopes = access_token.scope;
console.log(scopes);
});

client.on('vimeocall', function (qinput) {
console.log('got vimeo call');
lib.request(/*options*/{
// This is the path for the videos contained within the staff picks channels
path: '/videos',
// This adds the parameters to request page two, and 10 items per page
query: {
query: qinput,
per_page: 10
}
}, /*callback*/function (error, body, status_code, headers) {
if (error) {
console.log('error');
console.log(error);
} else {
console.log('body');
console.log(body);
}

console.log('status code');
console.log(status_code);
console.log('headers');
console.log(headers);
});
})


So, first problem is, that console logs in generateClientCredentials prints, that token and scopes is undefind;

Then I manually put there pregenerated token, to test it further.

Second problem - callback from lib.request logs status code 200, headers with data, but embty body - just body {}.

Testing on localhost.

Where I messed up?



Update:
headers prompts:



{ date: 'Thu, 16 Oct 2014 15:48:44 GMT',
server: 'Apache',
'set-cookie': [ 'vuid=1338193217.1277890698; expires=Sun, 13-Oct-2024 15:48:44
GMT; path=/; domain=.vimeo.com' ],
vary: 'Accept,Vimeo-Client-Id,Accept-Encoding',
'cache-control': 'no-cache, max-age=315360000',
expires: 'Sun, 13 Oct 2024 15:48:44 GMT',
'keep-alive': 'timeout=100, max=88',
connection: 'Keep-Alive',
'transfer-encoding': 'chunked',
'content-type': 'application/vnd.vimeo.video+json',
via: '1.1 dca1-10' }






node.js vimeo-api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 16 '14 at 15:50







Max Yari

















asked Oct 16 '14 at 8:14









Max YariMax Yari

1,65722142




1,65722142








  • 1





    The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

    – Dashron
    Oct 16 '14 at 15:38











  • Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

    – Max Yari
    Oct 16 '14 at 15:49













  • Yet waiting for some useful info

    – Max Yari
    Oct 20 '14 at 11:39






  • 2





    Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

    – Dashron
    Oct 20 '14 at 16:35








  • 1





    App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

    – Dashron
    Oct 22 '14 at 17:03














  • 1





    The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

    – Dashron
    Oct 16 '14 at 15:38











  • Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

    – Max Yari
    Oct 16 '14 at 15:49













  • Yet waiting for some useful info

    – Max Yari
    Oct 20 '14 at 11:39






  • 2





    Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

    – Dashron
    Oct 20 '14 at 16:35








  • 1





    App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

    – Dashron
    Oct 22 '14 at 17:03








1




1





The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

– Dashron
Oct 16 '14 at 15:38





The full callback signature of the generateClientCredentials callback is fn(err, body, status, headers). What value do you receive for each of those items?

– Dashron
Oct 16 '14 at 15:38













Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

– Max Yari
Oct 16 '14 at 15:49







Hey there, well, no error, body {}, status_code 200, headers - added they promt in question.

– Max Yari
Oct 16 '14 at 15:49















Yet waiting for some useful info

– Max Yari
Oct 20 '14 at 11:39





Yet waiting for some useful info

– Max Yari
Oct 20 '14 at 11:39




2




2





Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

– Dashron
Oct 20 '14 at 16:35







Unfortunately I've never seen this issue before. Try modifying the vimeo hosts to proxy your requests through runscope.com. Their tools might be able to help pinpoint the exact issue. If not, runscope lets you share your requests. You should share your requests with vimeo.com/help/contact

– Dashron
Oct 20 '14 at 16:35






1




1





App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

– Dashron
Oct 22 '14 at 17:03





App page tokens are authenticated. Requests made from that token can see all of your private content. ClientCredentials are unauthenticated, and have no association to a user account.

– Dashron
Oct 22 '14 at 17:03












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26399371%2fvimeo-api-response-body-empty%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26399371%2fvimeo-api-response-body-empty%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

The Sandy Post

Danny Elfman

Pages that link to "Head v. Amoskeag Manufacturing Co."