---
title: Get the sharing roles that the user has permission to set for a single file
description: GET /nd/api/share/share_role_forfile: Get the sharing role interface description that the user has the right to set for a single file, including path, method, parameters and return information.
slug: api-get-nd-api-share-share-role-forfile
lang: en
category: Sharing API
category_order: 8
order: 128
api_method: GET
api_path: /nd/api/share/share_role_forfile
api_label: Get the sharing roles that the user has permission to set for a single file
keywords:
  - API
  - Get the sharing roles that the user has permission to set for a single file
  - /nd/api/share/share_role_forfile
---

# Get the sharing roles that the user has permission to set for a single file

| Properties | Values |
| --- | --- |
| HTTP methods | `GET` |
| Interface path | `/nd/api/share/share_role_forfile` |
| Category | Share API |

## Interface description

Interface path: `/nd/api/share/share_role_forfile`

HTTP method: `GET`


**HTTP method:** `GET`

#### URL parameters

Parameter name Comment (description)
file_id file id string
#### Return field description

{"code":0,"roles":[],"success":true}

## Call instructions

- Before calling, you need to complete [Get token](api-post-api-token-do.md) or the corresponding login-free authentication, and carry `Authorization: Bearer <access_token>` in the request header.
- If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail.
- Category: Sharing API.
