{"meta":{"title":"소셜 계정에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 인증된 사용자의 소셜 계정을 관리합니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/users","title":"사용자"},{"href":"/ko/rest/users/social-accounts","title":"소셜 계정"}],"documentType":"article"},"body":"# 소셜 계정에 대한 REST API 엔드포인트\n\nREST API를 사용하여 인증된 사용자의 소셜 계정을 관리합니다.\n\n## 소셜 계정 관리 정보\n\n요청 URL에 `{username}` 매개 변수가 포함되어 있지 않으면 응답은 로그인한 사용자에 대한 것입니다(요청과 함께 [인증 정보](/ko/rest/authentication/authenticating-to-the-rest-api)를 전달해야 함). 사용자가 2단계 인증을 사용하도록 설정했는지 여부와 같은 추가 개인 정보는 기본 인증 또는 를 통해`user` 인증될 때 포함됩니다.\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List social accounts for the authenticated user\n\n```\nGET /user/social_accounts\n```\n\nLists all of your social accounts.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/user/social_accounts\n```\n\n**Response schema (Status: 200):**\n\nArray of `Social account`:\n\n* `provider`: required, string\n* `url`: required, string\n\n## Add social accounts for the authenticated user\n\n```\nPOST /user/social_accounts\n```\n\nAdd one or more social accounts to the authenticated user's profile.\nOAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n* **`account_urls`** (array of strings) (required)\n  Full URLs for the social media profiles to add.\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Adding multiple social accounts\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/user/social_accounts \\\n  -d '{\n  \"account_urls\": [\n    \"https://facebook.com/GitHub\",\n    \"https://www.youtube.com/@GitHub\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [List social accounts for the authenticated user](#list-social-accounts-for-the-authenticated-user).\n\n## Delete social accounts for the authenticated user\n\n```\nDELETE /user/social_accounts\n```\n\nDeletes one or more social accounts from the authenticated user's profile.\nOAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n* **`account_urls`** (array of strings) (required)\n  Full URLs for the social media profiles to delete.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **304** - Not modified\n\n* **401** - Requires authentication\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Deleting multiple social accounts\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/user/social_accounts \\\n  -d '{\n  \"account_urls\": [\n    \"https://facebook.com/GitHub\",\n    \"https://www.youtube.com/@GitHub\"\n  ]\n}'\n```\n\n**Response schema (Status: 204):**\n\n## List social accounts for a user\n\n```\nGET /users/{username}/social_accounts\n```\n\nLists social media accounts for a user. This endpoint is accessible by anyone.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`username`** (string) (required)\n  The handle for the GitHub user account.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/users/USERNAME/social_accounts\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List social accounts for the authenticated user](#list-social-accounts-for-the-authenticated-user)."}