• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Client Development Issue Using php script for api call

     
    • 1 Vote(s) - 5 Average

    Issue Using php script for api call

    Need to solve issue in php script for calling endpoint of users.
    Ahmad Arif
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2024 Apr
    Reputation: 0
    #1
    2024-04-28, 08:00 AM (This post was last modified: 2024-04-28, 08:02 AM by Ahmad Arif. Edited 2 times in total.)
    I make php script for calling the endpoint of user.But its still return only null.Not any response in kind of error.


    File Attachment.


    Attached Files
    .php   index.php (Size: 12.47 KB / Downloads: 99)
    ermineglug
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Oct
    Reputation: 0
    Country:United States
    #2
    2024-10-23, 05:05 AM
    (2024-04-28, 08:00 AM)Ahmad Arif Wrote: I make php script for calling the endpoint of user.But its still return only null.Not any response in kind of error.
    File Attachment.

    Hey there! Here are a few troubleshooting steps you can try to identify the problem:

    1. Check the Endpoint URL: Ensure that the URL you're calling is correct. A small typo can lead to a null response.
    2. Enable Error Reporting: Add "error_reporting(E_ALL);" and "ini_set('display_errors', 1);" at the beginning of your script to display any potential errors that might be hidden.
    3. Inspect Response: If you’re using "file_get_contents()" or "cURL", check if you're capturing the response correctly. For cURL, make sure to include "curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);" to get the response as a string instead of outputting it directly.
    4. Headers and Payload: Confirm that you’re sending the correct headers (like "Content-Type") and payload if required by the endpoint.
    5. API Authentication: If the endpoint requires authentication (like an API key or token), make sure you're passing it correctly.

    If you share your code, I might be able to provide more specific advice!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode