{"id":19339847,"url":"https://github.com/harrisonhoward/plex_pin_auth","last_synced_at":"2026-03-02T05:32:08.564Z","repository":{"id":236016664,"uuid":"791732272","full_name":"harrisonhoward/plex_pin_auth","owner":"harrisonhoward","description":"Authenticate with Plex via the Plex pin authentication method","archived":false,"fork":false,"pushed_at":"2024-08-25T06:08:28.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T08:28:17.908Z","etag":null,"topics":["gleam","plex","plex-api"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/plex_pin_auth","language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harrisonhoward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["harrisonhoward"]}},"created_at":"2024-04-25T09:06:24.000Z","updated_at":"2024-09-28T11:47:36.000Z","dependencies_parsed_at":"2024-04-25T10:27:59.746Z","dependency_job_id":"2bfcd2a5-7c07-444a-b352-a51f332a68ed","html_url":"https://github.com/harrisonhoward/plex_pin_auth","commit_stats":null,"previous_names":["harrisonhoward/plex_pin_auth"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/harrisonhoward/plex_pin_auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonhoward%2Fplex_pin_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonhoward%2Fplex_pin_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonhoward%2Fplex_pin_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonhoward%2Fplex_pin_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harrisonhoward","download_url":"https://codeload.github.com/harrisonhoward/plex_pin_auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonhoward%2Fplex_pin_auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29993376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gleam","plex","plex-api"],"created_at":"2024-11-10T03:24:05.453Z","updated_at":"2026-03-02T05:32:08.527Z","avatar_url":"https://github.com/harrisonhoward.png","language":"Gleam","funding_links":["https://github.com/sponsors/harrisonhoward"],"categories":[],"sub_categories":[],"readme":"# Plex Pin Authentication built with Gleam\n\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![Made with Gleam](https://img.shields.io/badge/Made%20with-Gleam-ffaff3.svg)](https://shields.io/)\n[![Status](https://img.shields.io/badge/Status-Completed-green.svg)](https://shields.io/)\n\n[![Package Version](https://img.shields.io/hexpm/v/plex_pin_auth)](https://hex.pm/packages/plex_pin_auth)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/plex_pin_auth/)\n\n## Scope\n\nThis project is linked to the project [plex_discord_rpc](https://github.com/harrisonhoward/plex_discord_rpc). The purpose of this project is to create a Gleam application that will authenticate with Plex using the pin authentication method. This will allow the user to authenticate with Plex and get the necessary token to make requests to the Plex API.\n\nSpecifically I created this to allow the user to authenticate themselves easily within the `plex_discord_rpc` tool, doing so allows the tool to connect to their Plex Media Server to connect to the WebSocket.\n\n## Usage\n\nThe method in which you handle getting a token is entirely left on the Developer. This an example of how you would create a pin and get the token.\n\nFeel free to use a package like [repeatedly](https://hexdocs.pm/repeatedly/) to handle the polling of the token.\n\n```gleam\nimport plex_pin_auth\nimport gleam/io\n\nconst my_client_id = \"YOUR_CLIENT_ID\"\n\npub fn main() {\n    // Creates the Plex pin\n    let assert Ok(pin) = plex_pin_auth.create_pin(client_id: my_client_id)\n    io.println(\"ID: \" \u003c\u003e pin.id)\n    io.println(\"Pin: \" \u003c\u003e pin.code)\n\n    // ... waiting for token\n\n    // Gets the token\n    let assert Ok(pin) = plex_pin_auth.get_token(my_client_id, pin.id)\n    let assert Some(token) = pin.auth_token\n    io.println(\"Token: \" \u003c\u003e token)\n}\n```\n\n## Plex Pin Auth Documentation\n\nIt appears the API isn't officially documented however I found some third-party documentation website. This website will be used in the creation of the pin authentication.\n\n-   [get-pin](https://plexapi.dev/api-reference/plex/get-a-pin)\n-   [get-token](https://plexapi.dev/api-reference/plex/get-access-token#get-access-token)\n\n## Contributing\n\n1. [Fork it](https://github.com/harrisonhoward/plex_pin_auth/fork)\n2. Clone your forked repository `git clone https://github.com/YOUR_USERNAME/plex_pin_auth.git`\n3. Create your feature branch `git checkout -b feature/my-new-feature`\n4. Commit your changes `git commit -am 'Add some feature'`\n5. Push to the branch `git push origin feature/my-new-feature`\n6. Create a new Pull Request\n\n## Author\n\n[Harrison Howard](https://github.com/harrisonhoward)\n\n\u003e harrison.howard00707@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrisonhoward%2Fplex_pin_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrisonhoward%2Fplex_pin_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrisonhoward%2Fplex_pin_auth/lists"}