POST api/Auth/Updatetoken?api={api}&id={id}
Cập nhật Token Mobile cho tài khoản để hệ thống có thể gửi notification
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| api |
Mã API do hệ thống cung cấp |
string |
Required |
| id |
id tài khoản |
string |
Default value is |
Body Parameters
Đối tượng chuyền vào
myPush| Name | Description | Type | Additional information |
|---|---|---|---|
| idpartner |
id đối tác |
string |
None. |
| tokenios |
Mã device token máy IOS |
string |
None. |
| fcmtoken |
Mã token google Android |
string |
None. |
| isnewtoken |
Thêm mới token: true: thêm mới hoặc update token đã có, false: Hủy token cũ đi (khi logout) |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"idpartner": "sample string 1",
"tokenios": "sample string 2",
"fcmtoken": "sample string 3",
"isnewtoken": true
}
application/xml, text/xml
Sample:
<myPush xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APISMART.Models.Human"> <fcmtoken>sample string 3</fcmtoken> <idpartner>sample string 1</idpartner> <isnewtoken>true</isnewtoken> <tokenios>sample string 2</tokenios> </myPush>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
DataUpdate| Name | Description | Type | Additional information |
|---|---|---|---|
| status | string |
None. |
|
| message | string |
None. |
|
| id | string |
None. |
|
| code | string |
None. |
|
| code1 | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"status": "sample string 1",
"message": "sample string 2",
"id": "sample string 3",
"code": "sample string 4",
"code1": "sample string 5"
}
text/javascript, application/javascript, application/json-p
Sample:
/**/ typeof === 'function' && ({"status":"sample string 1","message":"sample string 2","id":"sample string 3","code":"sample string 4","code1":"sample string 5"});
application/xml, text/xml
Sample:
<DataUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APISMART.Models"> <code>sample string 4</code> <code1>sample string 5</code1> <id>sample string 3</id> <message>sample string 2</message> <status>sample string 1</status> </DataUpdate>