-4

I'm developing an app which uses the data from podio website. Here my need is that Integrate the Podio api into my app and Authenticate the app with user credentials.

How this could be done?? please put some example codes. <<<THANKS IN ADVANCE>>>>>

NagaRaju
  • 17
  • 6
  • 3
    I suggest reading the [tour]. – yellowantphil Jul 11 '16 at 20:26
  • *There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.* – BSMP Aug 17 '16 at 22:46

2 Answers2

1

Podio has a well maintained/detailed API documentation.

Podio supports four different ways of authenticating depending on what kind of application you are building:

You could get the auth structure and sample codes here.

Mûhámmàd Yäsår K
  • 1,492
  • 11
  • 24
  • i try this muhammad authentication is done but i can't get any data into my app from podio how to resolve this issue Here is the authentication response of my app: 07-13 17:24:38.505 30397-30498/com.sermonseries V/response﹕ >>>>>>>>>>>>>>>>>>>{"access_token":"4c0e0087dd524c9884db095cf3f9f94a","expires_in":28800,"token_type":"bearer","scope":"global:all","ref":{"type":"user","id":2857528},"refresh_token":"4e41bae948854f8cb3c2dfe9acfc6042"} – NagaRaju Jul 13 '16 at 12:41
  • Hi @NagaRaju, which data you need to pull from Podio? – Mûhámmàd Yäsår K Jul 14 '16 at 10:04
  • i need to pull data of the app information created in my podio account – NagaRaju Jul 14 '16 at 15:16
  • As i follow the podio.developer.com steps i integrate podio android sdk into my dependencies and try to integrate the app with user credentials and i get the response as shown previous comment along with this response i am also getting error line like below: – NagaRaju Jul 14 '16 at 15:19
  • E/Volley﹕ [5686] BasicNetwork.performRequest: Unexpected response code 401 for https://api.podio.com/app/14547506?type=full please help to resolve this issue – NagaRaju Jul 14 '16 at 15:27
0

For authenticating with the application I wrote this code in Angular JS. It connects and authenticates with the API very well.

 function apiService($http,$q){

 var authEndPoint = 'https://podio.com/oauth/token?'
 var contactFormEndpoint = 'https://api.podio.com/item/app/'

 let YOUR_APP_ID = '*****';
 let YOUR_PODIO_APP_ID = '******';
 let YOUR_URL = 'http://localhost:9001';
 let YOUR_APP_SECRET = '*******';
 let YOUR_PODIO_APP_TOKEN = '**********';
 let params =  'grant_type=app&app_id=' + YOUR_PODIO_APP_ID + '&app_token='                                
 YOUR_PODIO_APP_TOKEN + '&client_id=' + YOUR_APP_ID + '&redirect_uri=' +  
 YOUR_URL + '&client_secret=' + YOUR_APP_SECRET;



let access_token;

var options = 
      {
          "external_id": "itemID",
          "fields": "fields", 
      };
var payload =
      {
        "name": "Mohammad",
        "email": "test@dis.com", 
        "your-message": "test",
         "options":options          

      };
    payload = JSON.stringify(payload);

// Promise-based API
return {
   auth : function() {
    return $http.post(authEndPoint + params, { 
   cache: false,

  }).then(function successCallback(response) {
        access_token = response.data.access_token;
        console.log("access t", access_token);
      // let  refresh_token = response.data.refresh_token;
      // let  token_type = response.data.token_type;
      // let  scope = response.data.scope;
    }, function errorCallback(response) {
       return access_token;
    });

  },
    sendContactDetails: function () {

      return $http.post(
      contactFormEndpoint + '******'+'/' ,payload, {
        headers: { 
        'Authorization': 'oauth_token' +  access_token
        },
      }).then(function successCallback(response) {

        console.log("sucess" + response);
    },
    function errorCallback(response) {
    console.log("failed"  + response);

    })

  }
  • thanks for your answer Aalam can i get thiscode in java or for android and also add the sample code for retrieve the data from the podio in to android app – NagaRaju Jul 25 '16 at 12:57