Title: API with PHP
Last modified: March 25, 2022

---

# API with PHP

 *  Resolved [Gerdski](https://wordpress.org/support/users/gerdski/)
 * (@gerdski)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/)
 * Hello,
 * I am thankful for your API functions. When I use:
    [https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken](https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken)
   i the Browser I get a list of all folders and subfolders, just what I wanted.
 * Now I want to get this data with PHP. I use a function with a shortcode. This
   function does the following:
 * $url = ‘[https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken&#8217](https://mywebsite.com/wp-json/filebird/public/v1/folders?token=mytoken&#8217);;
   
   $data = file_get_contents($url); $mydata = json_decode($data, true);
 * The URL is the exact same in both cases. But my PHP version returns only a very
   limited number of folders, not all. And the IDs are mixed up and different to
   the other version.
 * My PHP code is wrong, obviously. But why?
    Can you point me in the direction 
   of the right solution?
 * Thanks 🙂
    -  This topic was modified 4 years, 2 months ago by [Gerdski](https://wordpress.org/support/users/gerdski/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Ninja Team](https://wordpress.org/support/users/ninjateam/)
 * (@ninjateam)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/#post-15508564)
 * Hello [@gerdski](https://wordpress.org/support/users/gerdski/) ,
 * Please check out our documentation.
 * For APIs: [https://ninjateam.gitbook.io/filebird/developer-zone/apis](https://ninjateam.gitbook.io/filebird/developer-zone/apis)
   
   For Functions: [https://ninjateam.gitbook.io/filebird/developer-zone/functions](https://ninjateam.gitbook.io/filebird/developer-zone/functions)
 * Let us know if it helps you.
 * Best regards,
    Kelly
 *  Thread Starter [Gerdski](https://wordpress.org/support/users/gerdski/)
 * (@gerdski)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/#post-15508674)
 * Great! Thanks! I was looking for the functions before and found only the API…
 *  Plugin Author [Ninja Team](https://wordpress.org/support/users/ninjateam/)
 * (@ninjateam)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/#post-15509002)
 * [@gerdski](https://wordpress.org/support/users/gerdski/) Great to hear that it
   works for you. I hope you could leave FileBird a review to motivate our developers
   😉
    [https://wordpress.org/plugins/filebird/#reviews](https://wordpress.org/plugins/filebird/#reviews)
   Thank you so much ❤️
 * Kelly
 *  Thread Starter [Gerdski](https://wordpress.org/support/users/gerdski/)
 * (@gerdski)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/#post-15509073)
 * Yes, you are right…your support deserves five stars!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘API with PHP’ is closed to new replies.

 * ![](https://ps.w.org/filebird/assets/icon-128x128.gif?rev=2299145)
 * [FileBird - WordPress Media Library Folders & File Manager](https://wordpress.org/plugins/filebird/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/filebird/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/filebird/)
 * [Active Topics](https://wordpress.org/support/plugin/filebird/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/filebird/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/filebird/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Gerdski](https://wordpress.org/support/users/gerdski/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/api-with-php/#post-15509073)
 * Status: resolved