Use the REST API to manage social accounts of authenticated users.
If a request URL does not include a {username} parameter then the response will be for the signed-in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user scope.
Note
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.
GET /user/social_accounts
Lists all of your social accounts.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/user/social_accounts
Response schema (Status: 200):
Array of Social account:
provider: required, stringurl: required, stringPOST /user/social_accounts
Add one or more social accounts to the authenticated user's profile.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.account_urls (array of strings) (required)201 - Created
304 - Not modified
401 - Requires authentication
403 - Forbidden
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/user/social_accounts \
-d '{
"account_urls": [
"https://facebook.com/GitHub",
"https://www.youtube.com/@GitHub"
]
}'
Response schema (Status: 201):
Same response schema as List social accounts for the authenticated user.
DELETE /user/social_accounts
Deletes one or more social accounts from the authenticated user's profile.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.account_urls (array of strings) (required)204 - No Content
304 - Not modified
401 - Requires authentication
403 - Forbidden
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X DELETE \
https://api.github.com/user/social_accounts \
-d '{
"account_urls": [
"https://facebook.com/GitHub",
"https://www.youtube.com/@GitHub"
]
}'
Response schema (Status: 204):
GET /users/{username}/social_accounts
Lists social media accounts for a user. This endpoint is accessible by anyone.
accept (string)application/vnd.github+json is recommended.username (string) (required)
The handle for the GitHub user account.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/users/USERNAME/social_accounts
Response schema (Status: 200):
Same response schema as List social accounts for the authenticated user.