## 临时链接生成
```[tex]
用于动态的设置签字链接的页面显示属性,提交相关参数,会生成临时链接;该链接会根据客户端跳转到pc或者手机页面
```
```[tex]
请求参数说明:
token:账号的授权token
sequence_id :唯一对应着文件,是签字链接的sequence_id
config_param:页面配置参数,提交的时候,需要数据转成json字符串(方法:JSON.stringify());如:{"state":"write","sign_tool":{"move":"签字","date":"日期","text":"文本","image":"图片","fullTextPad":"全文圈批"}}
caller_id:自定义调用这唯一标识,可用来保存签字笔迹模版等
sign_areas:固定签字域,目前只有pc签字页面生效,每次只能设置一个固定签字域,设置此参数pc扫码签字后签字笔迹直接落到设定的区域,提交的时候需要将数据转换成json字符串;如:
{"page":"1","x": "0.64","y": "0.84","width": "0.15","height": "0.08"}
```
| config_param参数说明 | 功能说明 |实例|
| --- | --- | --- | --- |
| state | 枚举型:write(可写),read(只读,隐藏下方工具栏) | write |
| sign_tool | 设置页面签字工具栏按钮显示的文字 | {"move":"签字","date":"日期","text":"文本","image":"图片","fullTextPad":"全文圈批"} |
| sign_areas参数说明 | 功能说明 |实例|
| --- | --- |--- |
| page |固定签字域在文件的第几页 | 1 |
| x |固定签字域左上角的x坐标/文件的宽度 | 0.64 |
| y |固定签字域左上角的y坐标/文件的高度|0.84|
| width |固定签字域的宽度/文件的宽度| 0.15 |
| height |固定签字域的高度/文件的高度 | 0.08 |
~~~[api]
post:https://open.wellsign.cn/sdk/sign/v1/links/temporarylinks
*token=b4df7abff27641dcf0b92b3ef7e6ded8#
*sequence_id=91272325-5361-4f1a-8d6c-ad1b28b593231533010101509#
config_param={"state":"write","sign_tool":{"move":"签字","date":"日期","text":"文本","save":"保存"},"redirect_url":"https://www.wellsign.cn","sign_vertical":false}#把参数转成json字符串
caller_id=001#自定义调用的唯一标识
<<<
success
{
"succeed": 0,
"msg": null,
"data": {
"url": "http://localhost:8083/wellsign_test/localhost/phone/write/index.html?signature=eyJhbGciOiJIUzI1NiIsInR5GGJxfJ-0"
}
}
<<<
error
{
"succeed": 100,
"msg": {
"en": "Token validation failed",
"cn": "Token验证失败"
},
"data": null
}
~~~