Welcome to the new Box Support website. Check out all the details here on what’s changed.

JWT PHP Sample Code

Answered
New post

Comments

5 comments

  • Jason

    Hi ,

     

    Thanks for posting to our forums! Box doesn't have an officially supported PHP SDK, but you might be able to find good examples on our community supported projects page:

    https://developer.box.com/docs/community-supported-projects

     

    Looks like there's a few PHP projects there! Hope that helps!

     

    Thanks,

    Jason

    0
    Comment actions Permalink
  • hfh-sai

    Thanks.  Unfortunately there isn't any example code for JWT.

    0
    Comment actions Permalink
  • Isuke

    So did you find any solution for that ? 🙂

    0
    Comment actions Permalink
  • itoh

    Yes, you can find them in 

    https://github.com/maengkom/boxapi

    It has JWT PHP functions in BoxAppUser.php

     

    composer require maengkom/boxapi
     $config = array(
    'au_client_id' => 'client_id',
    'au_client_secret' => 'client_secret',
    'redirect_uri' => '',
    'enterprise_id' => 'enterprise_id',
    'app_user_name' => 'app_user_name',
    'app_user_id' => 'app_user_name',
    'public_key_id' => 'public_key_id',
    'passphrase' => 'passphrase',
    'expiration' => 60,
    'private_key_file' => 'private.pem',
    ); $box = new BoxAppUser($config); //print_r($box); $info = $box->getFolderInfo('0'); // Get TOP folder information print_r($info);

     

    I hope this info helps someone.

     

    0
    Comment actions Permalink
  • Luis79

    that package is not working for me on the appuser, I am not being able to get a token. I check the curl command and I can get it work! help!!! 

    0
    Comment actions Permalink

Please sign in to leave a comment.