# 获取上传凭证plg_cmd_get_upload_token
### 请求参数
| type | 1.图片 / 2.视频 / 3.音频 / 4.文档 |
| --- | --- |
| scene | 参考 files > table\_type 来源类型 |
| mode | 1.获取插件上传凭证 / 2.获取 SDK 上传凭证 |
```
$cmd = FresnsPluginConfig::PLG_CMD_GET_UPLOAD_TOKEN;
$input['type'] = $type;
$input['mode'] = $mode;
$input['scene'] = $scene;
$resp = PluginRpcHelper::call(FresnsPlugin::class, $cmd, $input);
if(PluginRpcHelper::isErrorPluginResp($resp)){
$this->errorCheckInfo($resp);
}
```