---
title: Get share resource by ID
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Resource Sharing](https://developers.cloudflare.com/api/typescript/resources/resource_sharing)

[Resources](https://developers.cloudflare.com/api/typescript/resources/resource_sharing/subresources/resources)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get share resource by ID

client.resourceSharing.resources.get(stringshareResourceID, ResourceGetParams {account\_id, share\_id } params, RequestOptionsoptions?): [ResourceGetResponse](<https://developers.cloudflare.com/api/typescript/resources/resource_sharing#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)>) {id, created, meta, 6 more }

GET/accounts/{account\_id}/shares/{share\_id}/resources/{share\_resource\_id}

Get share resource by ID.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### ParametersExpand Collapse

shareResourceID: string

Share Resource identifier.

maxLength32

[Link to this property](<#(resource)%20resource_sharing.resources%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20share_resource_id%20%3E%20(schema)>)

<details>

<summary>

params: ResourceGetParams {account\_id, share\_id }

</summary>

account\_id: string

Account identifier.

maxLength32

<a href="#(resource)%20resource_sharing.resources%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

share\_id: string

Share identifier tag.

maxLength32

<a href="#(resource)%20resource_sharing.resources%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20share_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20resource_sharing.resources%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

ResourceGetResponse {id, created, meta, 6 more }

</summary>

id: string

Share Resource identifier.

maxLength32

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created: string

When the share was created.

formatdate-time

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

meta: unknown

Resource Metadata.

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20meta">Link to this property</a>

modified: string

When the share was modified.

formatdate-time

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

resource\_account\_id: string

Account identifier.

maxLength32

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_account_id">Link to this property</a>

resource\_id: string

Share Resource identifier.

maxLength32

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_id">Link to this property</a>

<details>

<summary>

resource\_type: "custom-ruleset"| "gateway-policy"| "gateway-destination-ip"| 4 more

Resource Type.

</summary>

One of the following:

"custom-ruleset"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%200">Link to this property</a>

"gateway-policy"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%201">Link to this property</a>

"gateway-destination-ip"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%202">Link to this property</a>

"gateway-block-page-settings"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%203">Link to this property</a>

"gateway-extended-email-matching"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%204">Link to this property</a>

"idp-federation-grant"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%205">Link to this property</a>

"trust-grant"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_type">Link to this property</a>

resource\_version: number

Resource Version.

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20resource_version">Link to this property</a>

<details>

<summary>

status: "active"| "deleting"| "deleted"

Resource Status.

</summary>

One of the following:

"active"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"deleting"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"deleted"

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

</details>

[Link to this property](<#(resource)%20resource_sharing.resources%20%3E%20(model)%20resource_get_response%20%3E%20(schema)>)

### Get share resource by ID

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const resource = await client.resourceSharing.resources.get('023e105f4ecef8ad9ca31a8372d0c353', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
  share_id: '3fd85f74b32742f1bff64a85009dda07',
});

console.log(resource.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created": "2023-09-21T18:56:32.624632Z",
    "meta": {},
    "modified": "2023-09-21T18:56:32.624632Z",
    "resource_account_id": "023e105f4ecef8ad9ca31a8372d0c353",
    "resource_id": "023e105f4ecef8ad9ca31a8372d0c353",
    "resource_type": "custom-ruleset",
    "resource_version": 0,
    "status": "active"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created": "2023-09-21T18:56:32.624632Z",
    "meta": {},
    "modified": "2023-09-21T18:56:32.624632Z",
    "resource_account_id": "023e105f4ecef8ad9ca31a8372d0c353",
    "resource_id": "023e105f4ecef8ad9ca31a8372d0c353",
    "resource_type": "custom-ruleset",
    "resource_version": 0,
    "status": "active"
  }
}
```