mirror of
https://github.com/UIGF-org/mihoyo-api-collect.git
synced 2025-12-06 07:02:49 +08:00
Update authentication.md
Update authentication.md Update authentication.md
This commit is contained in:
@@ -41,11 +41,29 @@
|
||||
|
||||
<h3 id="hoyolab_header">米游社</h3>
|
||||
|
||||
大多数API需要验证的请求头:`x-rpc-app_version`、`x-rpc-client_type`、`x-rpc-device_id`、`X-Requested-With`、`Origin`、`Referer`、`Host`、`DS`、`User-Agent`。
|
||||
大多数API需要验证的请求头:
|
||||
- `x-rpc-app_version`
|
||||
- `x-rpc-client_type`
|
||||
- `x-rpc-device_id`
|
||||
- `X-Requested-With`
|
||||
- `Origin`
|
||||
- `Referer`
|
||||
- `Host`
|
||||
- `DS`
|
||||
- `User-Agent`
|
||||
|
||||
少数API才需要验证的额外的请求头:`x-rpc-device_fp`、`x-rpc-challenge`、`x-rpc-app_id`、`x-rpc-verify_key`。
|
||||
少数API才需要验证的额外的请求头:
|
||||
- `x-rpc-device_fp`
|
||||
- `x-rpc-challenge`
|
||||
- `x-rpc-app_id`
|
||||
- `x-rpc-verify_key`
|
||||
|
||||
可选请求头:`x-rpc-device_name`、`x-rpc-device_model`、`x-rpc-sys_version`、`x-rpc-channel`、`x-rpc-game_biz`。
|
||||
可选请求头:
|
||||
- `x-rpc-device_name`
|
||||
- `x-rpc-device_model`
|
||||
- `x-rpc-sys_version`
|
||||
- `x-rpc-channel`
|
||||
- `x-rpc-game_biz`
|
||||
|
||||
**说明:**
|
||||
|
||||
@@ -127,6 +145,12 @@ fun getDeviceId(context: Context): String {
|
||||
return uuid.toString()
|
||||
}
|
||||
```
|
||||
电脑上可以
|
||||
```python
|
||||
import uuid
|
||||
def getDevice():
|
||||
return uuid.uuid4()
|
||||
```
|
||||
|
||||
#### `X-Requested-With`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user