GET/sites/$site/publicize-connections/$publicize_connection_ID
Get a single publicize connection that is associated with the specified site.
Resource Information
Method | GET |
---|---|
URL | https://public-api.wordpress.com/rest/v1.1/sites/$site/publicize-connections/$publicize_connection_ID |
Requires authentication? | Yes |
Method Parameters
Parameter | Type | Description |
---|---|---|
$site | (int|string) | Site ID or domain. |
$publicize_connection_ID | (int) | The publicize connection ID to fetch. |
Query Parameters
Parameter | Type | Description |
---|---|---|
context | (string) |
|
http_envelope | (bool) |
|
pretty | (bool) |
|
meta | (string) | Optional. Loads data from the endpoints found in the 'meta' part of the response. Comma-separated list. Example: meta=site,likes |
fields | (string) | Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title |
callback | (string) | An optional JSONP callback function. |
Response Parameters
Parameter | Type | Description |
---|---|---|
ID | (int) | The ID of the publicize connection. |
site_ID | (int) | The site ID that the publicize connection belongs to. |
user_ID | (int) | The user ID that the publicize connection belongs to. |
keyring_connection_ID | (int) | The ID of the associated keyring connection. |
keyring_connection_user_ID | (int) | The ID of the user who owns the associated keyring connection. |
shared | (bool) | Is this connection shared? |
service | (string) | The name of the service associated with this publicize connection. |
label | (string) | The display friendly name of the service associated with this publicize connection. |
issued | (iso 8601 datetime) | Date when the publicize connection was first established. |
expires | (iso 8601 datetime) | Date when the publicize connection expires, if any. |
external_ID | (string) | An identifier for the user on the third-party service. |
external_name | (string) | A display friendly identifier for the user on the third-party service, usually a username or login name. |
external_display | (string|null) | A display friendly identifier for the user on the third-party service, typically defined by the user and the one that the user has chosen as their preferred identifier. |
external_profile_picture | (url|null) | The URL to the profile picture associated with the third-party account, if the service provides one. |
external_profile_URL | (url|null) | The URL to the external profile on the third-party website, if the service provides one. |
external_follower_count | (int|null) | The number of followers that the user has on the third-party service, if the service returns a number. |
read_only | (bool) | Returns true if the connection is available as read-only for the current user. This usually means the connection is shared and owned by a different user. The current user receives a reduced amount of information about the connection and cannot update or delete it. |
status | (string) | The current status of the connection to the third-party service. "ok" for connections with no problems, and "broken" for connections that need to be fixed fixed. |
refresh_URL | (url) | The URL to refresh the Keyring token. |
meta | (object) | Object with links to the publicize connection, help links and related items. |
Resource Errors
This endpoint does not return any errors.
Example
curl \ -H 'authorization: Bearer YOUR_API_TOKEN' \ 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.com/publicize-connections/1234'
<?php $options = array ( 'http' => array ( 'ignore_errors' => true, 'header' => array ( 0 => 'authorization: Bearer YOUR_API_TOKEN', ), ), ); $context = stream_context_create( $options ); $response = file_get_contents( 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.com/publicize-connections/1234', false, $context ); $response = json_decode( $response ); ?>