Redirect URL for Serverside Authentication in Development
I'm currently attempting to get started with the podio API and when generating a key I put localhost as my redirect domain. I'm using node.js and i followed along with the podio-js/example for server side authentication. I get the following returned in my browser https://podio.com/oauth/authorize?client_id=freedomnation-bztc45&redirect_uri=localhost&response_type=code using this particular request: app.get('/', function(req,res) { var authCode = req.query.code; var errorCode = req.query.error; podio.isAuthenticated().then(function() { res.send('success'); }).catch(function(err) { if(typeof authCode !== 'undefined') { podio.getAccessToken(authCode,redirectURL, function(err,res) { //we are ready to make API calls res.send('success'); }); }else if (typeof errorCode !== 'undefined') { //an error occured res.send('error', {description: req.query.error_description}); }else { //We have neither an authCode nor have we authenticated before res.send(podio.getAuthorizationURL(redirectURL)); } }); }); Hits hitting my last else statement. Can someone help me determine why?

  • Thank you. I got the server auth example working. I ended up getting the password authentication example working and I think that route may be best for my app. I have a question on filtering. I want to get all items from a specific app and I only want the response to contain certain fields from the items that are returned. So far I get all items from a specific app by sending a post to this url. /item/app/{appid}/filter/ What should I place in the request body to only get certain fields? should it be an object or array with the field ids?
  • Hi Abdullah, Are you using the server auth example as it is, or are you writing your own code based on it? I just tried running the server auth example using localhost as a return URL and it worked fine. If you have set up your config.json file correctly, I assume? Have you tried generating another API key, to see if something is wrong with the first one?
This question is closed.