Jump to content

Search the Community

Showing results for tags 'form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android Mobile
    • Android TV / Fire TV
    • Emby Theater
    • iOS
    • Apple TV
    • Kodi
    • Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • LG Smart TV
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Other
    • General Discussion
    • Developer API
    • Hardware
    • Media Clubs
    • Legacy Support

Blogs

  • Emby Blog

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. LanternMyWilly

    [API] Login with external form

    Hi! I'm trying to create a webform where you can create an account and login into Emby without having to login in 'https://domain.com/web/index.html#!/startup/login.html?serverId=123'. I've noticed that when you authenticate a user, this user stays authenticated throughout the entire browser. So I thought if I did a '/Users/AuthenticateByName' call in the form, this would would authenticate the user like it would when you normally login but it doesn't. So basically I call '/Users/AuthenticateByName' with my desired username and password I want to login, this does the job but when I go to the same url as provided in the api call, it still asks me to login. Both in the same browser. My code to authenticate the user: function userAuthenticate($username,$password) { $dataArray = array("Username"=>$username, "Pw"=>$password); $dataString = http_build_query($dataArray); $url= 'https://domain.com/emby/Users/AuthenticateByName?api_key=123456789&'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $responseDecoded = json_decode($response,true); echo $responseDecoded["AccessToken"]; } The code above does always succeed but doesn't do what I want (that is authenticating the user in https://domain.com/web). Now I'm wondering if it is possible to accomplish what I just described. Thanks in advance! (I'm sorry if I didn't describe my problem very well, I didn't really know how to ) Greetings!
×
×
  • Create New...