GET
https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url
Lấy URL cấp quyền
Auth: Bearer
Branch #10 — Tập trung OAuth Google cho Calendar, Drive, Docs, Sheets theo mô hình hub.
https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url
Lấy URL cấp quyền
Auth: Bearer
https://bizgpt.vn/wp-json/bizcity/v1/google/callback
OAuth callback
Auth: Public
https://bizgpt.vn/wp-json/bizcity/v1/google/status
Trạng thái kết nối
Auth: Bearer
https://bizgpt.vn/wp-json/bizcity/v1/google/disconnect
Ngắt kết nối
Auth: Bearer
| Method | Path | Auth | Mô tả |
|---|---|---|---|
| GET | https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url |
Bearer | Lấy URL cấp quyền |
| GET | https://bizgpt.vn/wp-json/bizcity/v1/google/callback |
Public | OAuth callback |
| GET | https://bizgpt.vn/wp-json/bizcity/v1/google/status |
Bearer | Trạng thái kết nối |
| POST | https://bizgpt.vn/wp-json/bizcity/v1/google/disconnect |
Bearer | Ngắt kết nối |
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url', {
method: 'GET',
headers: {
Authorization: 'Bearer biz-YOUR_KEY',
},
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/google/callback"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/google/callback', {
method: 'GET',
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/google/callback"
headers = {}
res = requests.get(url, headers=headers)
print(res.json())
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/google/status" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/google/status', {
method: 'GET',
headers: {
Authorization: 'Bearer biz-YOUR_KEY',
},
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/google/status"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())
curl -X POST "https://bizgpt.vn/wp-json/bizcity/v1/google/disconnect" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"sample":true}'
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/google/disconnect', {
method: 'POST',
headers: {
Authorization: 'Bearer biz-YOUR_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"sample":true}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/google/disconnect"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"sample":true}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/google/auth-url?return_url=https%3A%2F%2Fyour-site.com%2Foauth-callback" -H "Authorization: Bearer biz-YOUR_KEY"
docs/api/10-google-oauth.md