social_accounts
Creates, updates, deletes, gets or lists a social_accounts resource.
Overview
| Name | social_accounts |
| Type | Resource |
| Id | github.users.social_accounts |
Fields
The following fields are returned by SELECT queries:
- list_social_accounts_for_user
- list_social_accounts_for_authenticated_user
Response
| Name | Datatype | Description |
|---|---|---|
provider | string | (example: linkedin) |
url | string | (example: https://www.linkedin.com/company/github/) |
Response
| Name | Datatype | Description |
|---|---|---|
provider | string | (example: linkedin) |
url | string | (example: https://www.linkedin.com/company/github/) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_social_accounts_for_user | select | username | per_page, page | Lists social media accounts for a user. This endpoint is accessible by anyone. |
list_social_accounts_for_authenticated_user | select | per_page, page | Lists all of your social accounts. | |
add_social_account_for_authenticated_user | insert | account_urls | 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. | |
delete_social_account_for_authenticated_user | delete | 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
username | string | The handle for the GitHub user account. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_social_accounts_for_user
- list_social_accounts_for_authenticated_user
Lists social media accounts for a user. This endpoint is accessible by anyone.
SELECT
provider,
url
FROM github.users.social_accounts
WHERE username = '{{ username }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
Lists all of your social accounts.
SELECT
provider,
url
FROM github.users.social_accounts
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- add_social_account_for_authenticated_user
- Manifest
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.
INSERT INTO github.users.social_accounts (
account_urls
)
SELECT
'{{ account_urls }}' /* required */
RETURNING
provider,
url
;
# Description fields are for documentation purposes
- name: social_accounts
props:
- name: account_urls
value:
- "{{ account_urls }}"
description: |
Full URLs for the social media profiles to add.
DELETE examples
- delete_social_account_for_authenticated_user
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.
DELETE FROM github.users.social_accounts
;