---
title: 获取用户对于单个文件有权设置的分享角色
description: GET /nd/api/share/share_role_forfile：获取用户对于单个文件有权设置的分享角色 接口说明，包含路径、方法、参数和返回信息。
slug: api-get-nd-api-share-share-role-forfile
lang: zh
category: 分享 API
category_order: 8
order: 128
api_method: GET
api_path: /nd/api/share/share_role_forfile
api_label: 获取用户对于单个文件有权设置的分享角色
keywords:
  - API
  - 获取用户对于单个文件有权设置的分享角色
  - /nd/api/share/share_role_forfile
---

# 获取用户对于单个文件有权设置的分享角色

| 属性 | 值 |
| --- | --- |
| HTTP 方法 | `GET` |
| 接口路径 | `/nd/api/share/share_role_forfile` |
| 所属分类 | 分享 API |

## 接口说明

接口路径：`/nd/api/share/share_role_forfile`

HTTP 方法：`GET`


**HTTP 方法：** `GET`

#### URL 参数

参数名 Comment(说明)
file_id 文件 id string
#### 返回字段说明

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

## 调用说明

- 调用前需完成 [获取 token](api-post-api-token-do.md) 或相应免登录认证，并在请求 Header 中携带 `Authorization: Bearer <access_token>`。
- 参数和返回字段如因部署版本存在差异，应以实际私有云 API 文档和联调结果为准。
- 所属分类：分享 API。
