Client has not been setup with client id and client secret

Comments

5 comments

  • Stefan Ukena

    Hi Joel,

    please take a look at the documentation for the App authentication flow, which you are using:

    https://developers.podio.com/authentication/app_auth

    As you can see, there are 4 things you need to supply (not 2): the app_id, app_token, and the client_idand client_secret:

    Podio::setup(YOUR_CLIENT_ID, YOUR_CLIENT_SECRET);
    
    try {
      Podio::authenticate_with_app(YOUR_APP_ID, YOUR_APP_TOKEN);
    
      // Authentication was a success, now you can start making API calls.
    
    
    }
    catch (PodioError $e) {
      // Something went wrong. Examine $e->body['error_description'] for a description of the error.
    }
    

    So what are all these things? The client_id and client_secret identify your client (in your case: your PHP-script) to Podio. The app_id and app_token are allowing your client to access the app with the specific app_id. They are similar to a username / password in this way.

    Important: You should NEVER publish this information on the internet, because this is a security risk. You should delete the client_id and client_secret and create new once. Also, you should reset the app_token (in the developer menu of the app).

    Best,
    Stefan

    dieKollaborateure.com - Podio Training+Consulting+Development English & Deutsch

    0
    Comment actions Permalink
  • Joel Landry

    Hi Stefan,

    Thanks a lot for your help, it is very much appreciated.

    So I am not sure I understand the first part of the doc about the POST request, but I tried the code you posted and still no luck:

    Podio::setup("my-first-app-xii8h5", "jAkMDpoF4TeQo9I3eECVce22cctytv1AL7wkrJtcyZgVZ2niWm0AP0IO1Q7jMX41");

    try {
    Podio::authenticate_with_app("12842044", "575b032b397647a5a74ba06e8013a994");

    // Authentication was a success, now you can start making API calls.

    }
    catch (PodioError $e) {
    // Something went wrong. Examine $e->body['error_description'] for a description of the error.
    echo $e->body['error_description'];
    }

    the error_description now contains -> Invalid value "my-first-app-xii8h5" (string): must be integer"

    I don't understand why it is asking for an integer, since the client_id is alphanumeric ?? my-first-app-xii8h5 is my CLIENT_ID...?

    About the security risk, don't worry this is only a test app I will delete it and create a new one after I am able to establish a Podio connection through PHP.

    Thanks so much for your help :)

    0
    Comment actions Permalink
  • Joel Landry

    Anyone can help?

    0
    Comment actions Permalink
  • Florian Munz

    while the error doesn't match, I'm pretty sure it's the app_id that needs to be the integer, so like this:

    Podio::authenticatewithapp(12842044, "575b032b397647a5a74ba06e8013a994");

    0
    Comment actions Permalink
  • Joel Landry

    Thanks I figured it out after all... I re-uploaded the complete library onto my server and it worked :\

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk