我嘗試使用API請求,但問題是,頭請求需要請求ID和會話ID,我不知道如何得到它。如何獲取API頭請求的請求ID和會話ID
example from documentation. definition of request & session id
這是令牌(用於要求太)
{
access_token: "a2155617-ff2e-2646-80e5-bdc12b3666c1",
token_type: "bearer",
refresh_token: "0ef2a661-6ab8-4dbc-a535-7e5e2a7c4ceb",
expires_in: 14588,
scope: "read write trust"
}
這是我生成請求ID碼。
function guidv4()
{
if (function_exists('com_create_guid') === true)
return trim(com_create_guid(), '{}');
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}
誰能告訴我怎麼弄請求ID &會話ID喜歡的例子嗎?
你在使用後的API這個更新的代碼? – dontanios
我嘗試使用郵遞員先生,但不知道我必須填寫請求和會話ID字段@dontanios – illuminarch