Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare
Vào ngày 31 tháng 3 năm 2026, X đã thay đổi cách các nền tảng bên thứ ba truy cập API của mình. Do đó, mọi tài khoản Ayrshare đăng bài lên X thông qua Ayrshare đều phải đăng ký X Developer App của riêng mình và sử dụng API Key cùng API Secret của app đó trên mọi request.Đây là thay đổi trên toàn nền tảng bắt buộc bởi X và ảnh hưởng đến tất cả các công cụ bên thứ ba.
BYO keys được thiết lập một lần cho mỗi nền tảng (áp dụng cho toàn bộ tài khoản), không phải cho từng khách hàng hoặc sub-profile. Bạn tạo một X Developer App dưới tài khoản X của mình, và cùng một API Key + API Secret sẽ được áp dụng cho toàn bộ tài khoản X — chúng được sử dụng cho mọi sub-profile / end-user liên kết X dưới tài khoản Ayrshare của bạn. Nếu bạn có gói Business hoặc Enterprise với hàng trăm sub-profile, bạn không cần lặp lại thiết lập này cho từng cái. Bạn thiết lập một lần cho nền tảng X, sau đó truyền cùng hai header trong mỗi request.
Chúng tôi đã đơn giản hoá quy trình thiết lập để bạn thực hiện dễ dàng nhất có thể, và việc này chỉ mất chưa đến 10 phút. Làm theo hướng dẫn từng bước dưới đây, và nếu bạn cần trợ giúp, đội ngũ của chúng tôi luôn sẵn sàng hỗ trợ.
Hoàn tất onboarding cho developer và chấp nhận Developer Agreement cùng các chính sách.
3
Truy cập console
Bạn hiện đã ở trong X Developer Console.
Bước 2: Tạo một App
Bạn chỉ tạo một X Developer App cho mỗi tài khoản Ayrshare. Cùng một app với API Key + API Secret sẽ được tái sử dụng cho mọi sub-profile / end-user mà sau này bạn liên kết dưới tài khoản Ayrshare của mình. Bạn không tạo app mới cho từng khách hàng.
1
Điều hướng đến Apps
Trong Developer Console, điều hướng đến Apps.
2
Tạo app
Trong App dashboard, nhấp Create App (xem tài liệu thiết lập App của X để biết chi tiết). Nhập tên app (thường là tên thương hiệu của bạn). Tên này sẽ xuất hiện trên màn hình uỷ quyền OAuth khi người dùng kết nối tài khoản X của họ.
3
Chọn môi trường
Chọn môi trường Production trong menu thả xuống.
Dùng gói Pay-per-use. App của bạn phải nằm trong gói Pay-per-use, ở môi trường Production, không phải Standalone. Nếu không, việc liên kết tài khoản X sẽ thất bại với lỗi 403 “Client Forbidden” (client-not-enrolled).
4
Đóng cửa sổ pop-up credentials ban đầu
X sẽ tạo một số credential. Bỏ qua các credential này và đóng cửa sổ này lại.
Bước 3: Cấu hình quyền cho App
1
Mở cài đặt app của bạn
Trong “Apps,” tìm app mới (làm mới trang nếu app không xuất hiện), sau đó nhấp vào nó để xem chi tiết.Trong User authentication settings, nhấp Set up.
2
Thiết lập quyền cho app
Trong App permissions, chọn Read and write and Direct message. Điều này bắt buộc để hỗ trợ đầy đủ tính năng, bao gồm cả đăng bài và DM.
3
Thiết lập loại app
Trong Type of App, chọn Web App, Automated App or Bot. Đây là lựa chọn đúng cho các tích hợp phía server như Ayrshare.
4
Thiết lập callback và website URL
Trong App info:
Callback URL: Thêm cả hai callback URL sau:
https://profile.ayrshare.com/social-accounts
https://app.ayrshare.com/social-accounts
Website URL:https://app.ayrshare.com
Đừng bỏ qua bước này. Các callback URL này bắt buộc cho luồng liên kết OAuth. Khi người dùng cuối uỷ quyền kết nối X, X sẽ chuyển hướng họ về một trong các URL này để hoàn tất quy trình liên kết. Nếu thiếu, luồng OAuth sẽ thất bại với lỗi 403 Callback URL not approved.
5
Lưu cài đặt
Nhấp Save. Bạn có thể bỏ qua cửa sổ pop-up OAuth 2.0, vì bạn chỉ sử dụng 2 khoá của OAuth 1.0 (API Key và API Secret).
Quan trọng: Thiết lập quyền trước khi liên kết. Các quyền bạn chọn ở đây quyết định app của bạn có thể làm gì. Nếu bạn thay đổi quyền sau khi đã liên kết tài khoản X qua OAuth, bạn sẽ cần liên kết lại để Access Token mới kế thừa quyền đã cập nhật.
Hãy đảm bảo bạn lưu lại 2 khoá này:
API Key (còn gọi là Consumer Key, định danh của X app)
API Secret (còn gọi là Consumer Secret)
Bạn KHÔNG cần tạo Access Token thủ công. Ayrshare xử lý việc này tự động khi bạn liên kết tài khoản X qua OAuth.
Bước 4: Mua X API Credits
X hiện dùng hệ thống thanh toán API dựa trên credit, được mua thông qua developer console.
1
Điều hướng đến billing
Trong Developer Console, nhấp Billing → Credits ở thanh bên trái.
2
Mua credits
Mua credits (mức tối thiểu là $5, đủ cho hàng trăm lệnh API). Mỗi lệnh gọi API chỉ tốn một phần nhỏ của một cent, vì vậy chi phí sẽ tối thiểu đối với hầu hết người dùng.
3
Bật tự động nạp lại
Bạn có thể bật auto-recharge để tránh gián đoạn dịch vụ và quản lý giới hạn chi tiêu bằng cách đặt mức tối đa bạn có thể chi trong chu kỳ thanh toán.
Các lệnh gọi API của bạn sẽ thất bại nếu không có credits. API của X là pay-per-use. Nếu số dư credit của bạn bằng 0, mọi request API sẽ trả về lỗi 402 CreditsDepleted với thông báo “Your enrolled account does not have any credits to fulfill this request.” Điều này bao gồm cả đăng bài, đọc tweet và tra cứu người dùng. Hãy nạp credits trước khi kiểm thử tích hợp của bạn. Xem Cách định giá X API hoạt động để biết cập nhật đầy đủ về giá của X.
Bước 5: Cập nhật các lệnh gọi API Ayrshare của bạn
Ở Bước 3, bạn đã lưu 2 mục sau một cách an toàn trong env, config hoặc secrets manager của riêng bạn:
API Key (còn gọi là Consumer Key, định danh của X app)
API Secret (còn gọi là Consumer Secret)
Bây giờ, hãy thêm thông tin xác thực X vào header của các lệnh gọi API Ayrshare.
Khóa của bạn vẫn được giữ riêng tư. API Key và API Secret bạn gửi trong các header này chỉ được dùng cho riêng yêu cầu đó và không được Ayrshare lưu lại. Việc tạo URL liên kết là ngoại lệ duy nhất, được mô tả trong mục Bảo mật bên dưới.
Tham chiếu Header
Header
Giá trị
X-Twitter-OAuth1-Api-Key
API Key (Consumer Key)
X-Twitter-OAuth1-Api-Secret
API Key Secret (Consumer Secret)
Cách nhận biết nếu quyền của bạn bị sai:
Nếu quyền của app bị cấu hình sai, request API có thể trả về lỗi 403 Forbidden với thông báo: “Your client app is not configured with the appropriate OAuth1 app permissions.”
Nếu bạn thấy lỗi này, hãy cập nhật quyền của app thành Read and write and Direct message trong X Developer Console, sau đó liên kết lại tài khoản X qua OAuth để Access Token mới kế thừa quyền đã cập nhật.
Ví dụ mã
curl -X POST https://api.ayrshare.com/api/post \ -H "Authorization: Bearer YOUR_AYRSHARE_API_KEY" \ -H "X-Twitter-OAuth1-Api-Key: your_api_key" \ -H "X-Twitter-OAuth1-Api-Secret: your_api_secret" \ -H "Content-Type: application/json" \ -d '{"post": "Hello from my own X App!", "platforms": ["twitter"]}'
const response = await fetch("https://api.ayrshare.com/api/post", { method: "POST", headers: { "Authorization": "Bearer YOUR_AYRSHARE_API_KEY", "Content-Type": "application/json", "X-Twitter-OAuth1-Api-Key": process.env.X_API_KEY, "X-Twitter-OAuth1-Api-Secret": process.env.X_API_SECRET, }, body: JSON.stringify({ post: "Hello from my own X App!", platforms: ["twitter"], }),});
import osimport requestsheaders = { "Authorization": "Bearer YOUR_AYRSHARE_API_KEY", "Content-Type": "application/json", "X-Twitter-OAuth1-Api-Key": os.environ["X_API_KEY"], "X-Twitter-OAuth1-Api-Secret": os.environ["X_API_SECRET"],}response = requests.post( "https://api.ayrshare.com/api/post", headers=headers, json={"post": "Hello from my own X App!", "platforms": ["twitter"]},)
Các quy trình tự động và workflow hiện có của bạn sẽ tiếp tục hoạt động miễn là bạn đưa header API Key và API Secret vào mọi request tới X.
Chuyển đổi các profile hiện có (Business & Enterprise)
Nếu bạn có sub-profile đã được liên kết với X thông qua Ayrshare, các profile đó cần liên kết lại tài khoản X sau khi bạn chuyển sang BYO keys. Điều này là vì access token hiện có đã được cấp dưới X app của Ayrshare và không thể sử dụng với consumer key của bạn (chữ ký OAuth 1.0a bị ràng buộc với app cấp token).
1
Đưa các khoá của bạn vào generateJWT
Thêm twitterApiKey và twitterApiSecret vào body của lệnh gọi generateJWT. Chúng được mã hóa và lưu cùng với session liên kết, và không bị lộ cho người dùng cuối của bạn.
Tạo URL liên kết là trường hợp duy nhất consumer key của bạn nằm trong body: lệnh gọi này, hoặc POST /profiles/link-sessions. Mọi yêu cầu X khác đều dùng các header mô tả ở trên.
2
Yêu cầu người dùng liên kết lại X
Sau khi tạo JWT với các khoá được đưa vào, người dùng của bạn cần kết nối lại tài khoản X thông qua trang liên kết profile. Màn hình chấp thuận OAuth giờ sẽ hiển thị tên app của bạn thay vì của Ayrshare.Để làm mọi việc đơn giản hơn, bạn có thể:
Huỷ liên kết tài khoản theo cách lập trình qua Unlink API, sau đó yêu cầu người dùng uỷ quyền lại
Sử dụng logout parameter trong generateJWT để buộc đăng nhập mới
Sử dụng allowedSocial để chỉ hiển thị X trên trang liên kết trong luồng chuyển đổi
3
Tiếp tục gửi header trên tất cả các lệnh gọi API
Sau khi liên kết lại, tiếp tục đưa các header X-Twitter-OAuth1-Api-Key và X-Twitter-OAuth1-Api-Secret vào mọi lệnh gọi API (đăng bài, analytics, comments, v.v.).
Sau khi một profile đã liên kết lại dưới X app của bạn, tất cả các bài đăng tiếp theo cho profile đó sẽ sử dụng thông tin xác thực của bạn. Bạn có thể xác minh điều này bằng cách kiểm tra trang Usage trong X Developer Console của bạn.
Kiểm tra thiết lập của bạn
Thực hiện một lệnh gọi thử qua Ayrshare API với các header mới để xác nhận mọi thứ đang hoạt động. Endpoint /analytics/social là một bài kiểm tra nhẹ tốt, vì nó không tạo bài đăng nào.
Cách định giá X API hoạt động
Trước đây, Ayrshare chi trả cho việc sử dụng API của X thay bạn. Theo mô hình hiện tại của X, mỗi khách hàng Ayrshare duy trì tài khoản X Developer của riêng mình và trả tiền trực tiếp cho X cho các request API mà ứng dụng của họ thực hiện. (Một tài khoản X Developer trên mỗi tài khoản Ayrshare, không phải trên mỗi end-user. Tất cả sub-profile của bạn dùng chung một tài khoản X Developer và số dư credit.)Mô hình định giá của X là pay-per-use: bạn mua credit trong X Developer Console, và chúng bị trừ khi các request API được thực hiện. Không cần hợp đồng hay đăng ký gói.Các tác vụ điển hình có chi phí thấp. Ví dụ:
Tác vụ
Chi phí xấp xỉ
Tạo bài đăng (chỉ văn bản)
~$0.01 mỗi bài
Tạo bài đăng có media
~$0.02 mỗi bài (upload media và tạo bài đăng là các request riêng biệt)
Đọc một bài đăng
~$0.005 mỗi lượt đọc
Tra cứu người dùng
~$0.01 mỗi lượt tra cứu
Gửi DM
~$0.01 mỗi tin nhắn
Đọc sự kiện DM
~$0.01 mỗi sự kiện
Tương tác người dùng (follow, like, v.v.)
~$0.015 mỗi request
Để tham khảo, nếu bạn đăng khoảng 100 lần mỗi tháng, chi phí trực tiếp cho X sẽ vào khoảng $1, và các bài đăng có media sẽ khoảng $2 mỗi tháng.
Định giá pay-per-use của X hiện đang trong giai đoạn thử nghiệm. Tỷ giá có thể thay đổi và có thể có chi phí bổ sung. Luôn kiểm tra Developer Console để biết định giá mới nhất. Xem phân tích thông tin định giá của X.
Chúng tôi biết điều này giới thiệu một khoản chi phí chưa từng tồn tại trước đây, và chúng tôi muốn minh bạch về điều đó. Đồng thời, mô hình này cũng mở ra một số lợi ích không thể có trong thiết lập chia sẻ khoá trước đây.
Lợi ích của việc dùng X API Key của riêng bạn
Việc sử dụng thông tin xác thực X API của riêng bạn cung cấp khả năng kiểm soát và độ tin cậy tốt hơn so với mô hình chia sẻ khoá trước đây. Bao gồm:
Trải nghiệm OAuth có thương hiệu: Người dùng thấy tên app và thương hiệu của bạn khi uỷ quyền truy cập X.
Giới hạn tốc độ riêng: Việc sử dụng API của bạn được điều chỉnh bởi giới hạn của tài khoản X Developer của riêng bạn, tách biệt khỏi các người dùng Ayrshare khác. Bạn có thể theo dõi sử dụng của mình trong X Developer Console và xem tài liệu về giới hạn tốc độ API của X.
Kiểm soát thông tin xác thực: API Key và Secret của bạn vẫn nằm trong tài khoản X Developer của chính bạn. Ayrshare không lưu các khóa bạn gửi trong header của yêu cầu. Việc tạo URL liên kết là ngoại lệ duy nhất, được mô tả trong mục Bảo mật bên dưới.
Tính di động: Vì người dùng xác thực với X App của bạn, tích hợp của bạn vẫn hoàn toàn nằm dưới sự kiểm soát của bạn.
Khả năng hiển thị sử dụng: Dashboard X Developer của bạn hiển thị các request API, giới hạn tốc độ và mức sử dụng credit.
X là nền tảng đầu tiên yêu cầu mô hình này, nhưng ngày càng nhiều nền tảng đang hướng tới “bring your own API key.” Chúng tôi đang mở rộng khả năng này trên toàn Ayrshare, để các developer có cùng khả năng kiểm soát và độc lập trên tất cả các nền tảng mạng xã hội.
Bảo mật
API Key và API Secret bạn gửi trong header của yêu cầu chỉ được dùng cho riêng yêu cầu đó và không được Ayrshare lưu lại.
Việc tạo URL liên kết là ngoại lệ. Khi bạn gửi twitterApiKey và twitterApiSecret tới POST /profiles/generateJWT hoặc POST /profiles/link-sessions, cặp khóa này được mã hóa và lưu cùng với session liên kết đó, vì trang liên kết cần đến nó khi người dùng của bạn cấp quyền cho X ngay sau đó. Nó được xóa khi bạn thu hồi liên kết, hoặc khi một liên kết đã hết hạn được mở hay kiểm tra lần kế tiếp, và trong mọi trường hợp sẽ bị xóa cùng với bản ghi session trong vòng 30 ngày.
Tôi có cần thiết lập điều này cho mỗi khách hàng / sub-profile không?
Không. Bạn thiết lập một X Developer App dưới tài khoản X của mình, và cùng một API Key + API Secret được tái sử dụng cho mọi sub-profile / end-user bạn liên kết dưới tài khoản Ayrshare của mình.
Bạn tạo X Developer App một lần.
Bạn truyền cùng hai header (X-Twitter-OAuth1-Api-Key và X-Twitter-OAuth1-Api-Secret) trong mỗi lệnh gọi API Ayrshare, bất kể lệnh gọi đó dành cho sub-profile nào.
Các end-user của bạn vẫn phải trải qua luồng liên kết OAuth để uỷ quyền tài khoản X của họ, nhưng họ không cần X Developer App hay API key của riêng họ. Họ kết nối thông qua app của bạn.
Tất cả sub-profile chia sẻ cùng một tài khoản X Developer, cùng giới hạn tốc độ và cùng số dư credit.
Lần duy nhất bạn xử lý khoá cho từng profile là trong body generateJWT trong quá trình chuyển đổi, và đó vẫn là cùng hai khoá của bạn, chỉ được gửi đến trang liên kết để end-user có thể uỷ quyền lại dưới app của bạn.
Yêu cầu về X API key đã có hiệu lực chưa?
Có. Từ ngày 31 tháng 3 năm 2026, tất cả các hoạt động X thông qua Ayrshare đều yêu cầu thông tin xác thực X API của riêng bạn. Nếu bạn chưa thiết lập tài khoản X Developer, hãy làm theo các bước trên.
Điều gì xảy ra nếu tôi không thêm X API key vào Ayrshare?
Việc đăng bài lên X thông qua Ayrshare yêu cầu thông tin xác thực X API của riêng bạn. Các request không có thông tin BYO hợp lệ sẽ bị từ chối. Việc đăng bài lên các nền tảng khác (Instagram, LinkedIn, Facebook, TikTok, v.v.) không bị ảnh hưởng.
X API có giá bao nhiêu?
X tính phí cho mỗi lệnh gọi API. Tạo một bài đăng tốn khoảng $0.01, và đọc một bài đăng tốn khoảng $0.005. Ví dụ, xuất bản 100 bài đăng mỗi tháng sẽ tốn khoảng $1. Xem trang định giá của X để biết chi tiết đầy đủ.
Điều này có thay đổi giá gói đăng ký Ayrshare của tôi không?
Không. Giá gói đăng ký Ayrshare của bạn không đổi. Chi phí bổ sung duy nhất là phí sử dụng X API được X tính trực tiếp qua tài khoản developer của bạn.
Ayrshare có lưu trữ thông tin xác thực X API của tôi không?
Với các yêu cầu API thông thường thì không: API Key và API Secret bạn gửi trong header chỉ được dùng cho riêng yêu cầu đó và không được lưu lại. Việc tạo URL liên kết là ngoại lệ, vì trang liên kết cần cặp khóa này khi người dùng của bạn cấp quyền cho X. Ở đó nó được mã hóa và lưu cùng với session liên kết, rồi được xóa khi bạn thu hồi liên kết, khi một liên kết đã hết hạn được mở hay kiểm tra lần kế tiếp, hoặc cùng với bản ghi session trong vòng 30 ngày. Xem mục Bảo mật ở trên, và hướng dẫn bảo mật xác thực của X để biết các thực hành chung.
Tôi đã có tài khoản X Developer. Tôi có thể dùng khoá hiện có không?
Có. Bạn có thể sử dụng X App hiện có miễn là nó đã bật quyền “Read and write” (và Direct Messages nếu bạn sử dụng tính năng DM).Bạn sẽ cần API Key (Consumer Key) và API Secret (Consumer Secret) từ phần Keys and tokens của X Developer Console. Liên kết tài khoản X qua OAuth, sau đó đưa 2 header này vào các request API Ayrshare.Nếu bạn đã thay đổi quyền của app kể từ lúc thiết lập ban đầu, hãy liên kết lại tài khoản X để Access Token kế thừa quyền đã cập nhật.
X Developer Portal hiển thị nhiều thông tin xác thực. Tôi thực sự cần cái nào?
Bạn cần API Key (Consumer Key) và API Secret (Consumer Secret). Xem bảng tham chiếu header ở trên để biết chính xác mỗi cái ánh xạ đến header nào của Ayrshare. Bạn có thể bỏ qua Client ID, Client Secret, Bearer Token, Access Token và Access Token Secret.
Sự khác biệt giữa 'API Key' và 'Client ID' là gì?
Chúng là các thông tin xác thực hoàn toàn khác nhau cho các phương thức xác thực khác nhau:
API Key (còn gọi là “Consumer Key”) dành cho OAuth 1.0a. API Key (Consumer Key) + API Secret là những gì Ayrshare sử dụng. Nó hoạt động với tất cả tính năng của X, token không hết hạn và không cần logic refresh.
Client ID dành cho OAuth 2.0. Bạn KHÔNG cần cái này cho Ayrshare. Token OAuth 2.0 hết hạn sau một thời gian ngắn và yêu cầu quản lý refresh token.
Đối với Ayrshare, bạn chỉ cần API Key và API Secret. Bạn có thể bỏ qua Client ID, Client Secret và Bearer Token.
Tại sao là OAuth 1.0a mà không phải OAuth 2.0?
Access token OAuth 2.0 hết hạn sau mỗi 2 giờ và refresh token của X chỉ dùng được một lần (mỗi lần refresh vô hiệu hoá token cũ). Điều này khiến không thể hỗ trợ mô hình BYO stateless, đặc biệt là cho các bài đăng đã lên lịch. Token OAuth 1.0a không hết hạn, hoạt động với tất cả tính năng của X và không cần quản lý token.
Người dùng hiện có của tôi có cần liên kết lại tài khoản X không?
Có. Nếu người dùng của bạn đã liên kết X qua Ayrshare trước khi bạn thiết lập BYO keys, họ sẽ cần kết nối lại. Access token hiện có đã được cấp dưới X app của Ayrshare và sẽ không hoạt động với consumer key của bạn. Xem Chuyển đổi các profile hiện có ở trên để biết quy trình từng bước.
Thay đổi này có ảnh hưởng đến việc đăng bài lên Instagram, LinkedIn hoặc các nền tảng khác không?
Không. Thay đổi này chỉ ảnh hưởng đến việc đăng bài lên X. Tất cả các tích hợp nền tảng khác trong Ayrshare tiếp tục hoạt động như thường lệ.
Còn tự động đăng RSS/Feed lên X thì sao?
Không còn hỗ trợ tự động đăng RSS lên X. Nguồn cấp RSS chạy tự động theo lịch, nhưng mô hình bring-your-own API key yêu cầu thông tin xác thực phải được cung cấp với mỗi request API. Vì vậy, các nguồn cấp RSS không thể xác thực khi bài đăng được gửi.Nếu bạn trước đây đã dùng RSS để đăng lên X, chúng tôi khuyến nghị chuyển sang bài đăng đã lên lịch hoặc các lệnh gọi API trực tiếp có bao gồm thông tin xác thực của bạn. Tự động đăng RSS lên tất cả các nền tảng khác không thay đổi.
Tại sao tôi nhận được lỗi 402 "CreditsDepleted"?
Điều này có nghĩa là tài khoản X Developer của bạn không còn credit API nào. Đi tới console.x.com → Billing → Credits và mua credit. Ngay cả $5 cũng đủ cho hàng trăm lệnh gọi API. Khi credit đã được nạp, hãy thử lại request của bạn.
Tại sao tôi nhận được lỗi 403 "Forbidden: OAuth1 App Permissions"?
Access Token của bạn không có quyền phù hợp. Điều này thường có nghĩa là một trong hai điều:
Quyền của app được thiết lập là “Read” thay vì “Read and write.” Đi tới Settings của app trong Developer Console và đổi thành Read and write and Direct message.
Bạn đã thay đổi quyền sau khi liên kết tài khoản X. Access Token giữ quyền tại thời điểm được tạo. Liên kết lại tài khoản X qua OAuth để token mới kế thừa quyền đã cập nhật.
Nếu tôi cần trợ giúp thiết lập thì sao?
Đội ngũ hỗ trợ của chúng tôi rất sẵn lòng giúp đỡ. Nếu bạn có câu hỏi hoặc gặp vấn đề trong quá trình thiết lập, vui lòng liên hệ qua support@ayrshare.com, và chúng tôi sẽ hướng dẫn bạn qua từng bước.
Xử lý sự cố
Tôi gặp lỗi 400 về việc thiếu header
Hãy chắc chắn bạn đang gửi cả hai header bắt buộc:
X-Twitter-OAuth1-Api-Key
X-Twitter-OAuth1-Api-Secret
Nếu bạn thấy lỗi thiếu cặp (ví dụ: “You provided Api-Key but not Api-Secret”), điều đó có nghĩa là một trong hai bị thiếu. Cả hai luôn bắt buộc.Thông báo lỗi sẽ cho bạn biết header cụ thể nào bị thiếu.
Tôi gặp lỗi 403: "Callback URL not approved"
Nếu bạn thấy lỗi này khi cố gắng liên kết tài khoản X, hãy chắc chắn bạn đã thêm các callback URL bắt buộc vào cài đặt X Developer App của bạn (trong Authentication settings > Callback URI / Redirect URL):
Tài khoản X Developer của bạn không có credit API nào được nạp. Đi tới console.x.com → Billing → Credits và mua credit. Ngay cả $5 cũng đủ cho hàng trăm lệnh gọi API.
Tôi gặp lỗi 403: "oauth1 app permissions"
Access Token của bạn không có quyền phù hợp. Điều này thường có nghĩa là:
Quyền của app được thiết lập là “Read” thay vì “Read and write.” Đi tới Settings của app trong Developer Console và đổi thành Read and write and Direct message.
Bạn đã thay đổi quyền sau khi liên kết tài khoản X. Access Token giữ quyền tại thời điểm được tạo. Liên kết lại tài khoản X qua OAuth để token mới kế thừa quyền đã cập nhật.
App X của bạn chưa được đăng ký cho X API v2. Điều này xảy ra khi app nằm trong gói Standalone.Trong X Developer Console, chuyển app từ Standalone sang gói Pay-per-use (môi trường Production), sau đó liên kết lại tài khoản X. Xem Bước 2: Tạo một App ở trên.
Cần trợ giúp?
Nếu bạn có câu hỏi hoặc gặp vấn đề khi thiết lập X API key, đội ngũ kỹ thuật của chúng tôi rất sẵn lòng giúp đỡ. Bạn có thể liên hệ với chúng tôi bất cứ lúc nào tại support@ayrshare.com.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Ayrshare Docs","colors":{"primary":"#2266C2","light":"#4985D8","dark":"#1A4E9A"},"logo":{"light":"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=8d23367f493d06599eecbbfa2b6325cf","dark":"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-dark.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=77590acef2781d2fec9a1b14b6e09b73","href":"https://www.ayrshare.com/docs"},"favicon":"https://mintcdn.com/ayrshare-docs/dKBti0xVDJrOZ19f/images/logos/icon-docs.png?fit=max\u0026auto=format\u0026n=dKBti0xVDJrOZ19f\u0026q=85\u0026s=9704762afaad78a9cfdd90a20cb1d253","api":{"playground":{"display":"simple"},"examples":{"languages":["bash","javascript","python","php","go","java"]},"mdx":{"auth":{"method":"bearer"},"server":"https://api.ayrshare.com/api"}},"appearance":{"default":"dark"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://www.ayrshare.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.ayrshare.com"}},"footer":{"socials":{"github":"https://github.com/ayrshare","x":"https://x.com/ayrshare","bluesky":"https://bsky.app/profile/ayrshare.com","facebook":"https://www.facebook.com/Ayrshare","linkedin":"https://www.linkedin.com/company/ayrshare","youtube":"https://www.youtube.com/@ayrshare"}},"seo":{"indexing":"navigable"},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-P23WG8W"},"plausible":{"domain":"docs.ayrshare.com"}},"contextual":{"options":["copy","chatgpt","claude","perplexity","cursor","vscode"],"display":"header"},"navigation":{"languages":[{"language":"en","href":"introduction"},{"language":"es","href":"es/introduction"},{"language":"cn","hidden":true,"href":"cn/introduction"},{"language":"zh","hidden":true,"href":"zh/introduction"},{"language":"pt-BR","href":"pt-BR/introduction"},{"language":"fr","href":"fr/introduction"},{"language":"de","href":"de/introduction"},{"language":"vi","href":"vi/introduction"},{"language":"ja","href":"ja/introduction"},{"language":"uk","href":"uk/introduction"},{"language":"hi","href":"hi/introduction"},{"language":"ar","href":"ar/introduction"},{"language":"zh-Hans","href":"zh-Hans/introduction"},{"language":"zh-Hant","href":"zh-Hant/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ayrshare-docs","hasAudioNarration":false,"actualSubdomain":"ayrshare-docs","customDomains":["www.ayrshare.com"],"gitSource":{"type":"github","owner":"ayrshare","repo":"ayrshare_3","deployBranch":"docs-prod","contentDirectory":"apps/mintlify","isPrivate":true,"mountPath":"","label":"","_id":"6aec8a4b6de9d64b11a45855"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b098ef4e61e2696e7016ed3","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"en","tag":"Documentation","count":262},{"language":"ar","tag":"Documentation","count":262},{"language":"de","tag":"Documentation","count":262},{"language":"es","tag":"Documentation","count":262},{"language":"fr","tag":"Documentation","count":262},{"language":"hi","tag":"Documentation","count":262},{"language":"ja","tag":"Documentation","count":262},{"language":"pt-BR","tag":"Documentation","count":262},{"language":"uk","tag":"Documentation","count":262},{"language":"vi","tag":"Documentation","count":262},{"language":"zh-Hans","tag":"Documentation","count":262},{"language":"zh-Hant","tag":"Documentation","count":262},{"language":"en","tag":"API Endpoints","count":183},{"language":"ar","tag":"API Endpoints","count":183},{"language":"de","tag":"API Endpoints","count":183},{"language":"es","tag":"API Endpoints","count":183},{"language":"fr","tag":"API Endpoints","count":183},{"language":"hi","tag":"API Endpoints","count":183},{"language":"ja","tag":"API Endpoints","count":183},{"language":"pt-BR","tag":"API Endpoints","count":183},{"language":"uk","tag":"API Endpoints","count":183},{"language":"vi","tag":"API Endpoints","count":183},{"language":"zh-Hans","tag":"API Endpoints","count":183},{"language":"zh-Hant","tag":"API Endpoints","count":183},{"language":"en","tag":"Help Center","count":126},{"language":"ar","tag":"Help Center","count":126},{"language":"de","tag":"Help Center","count":126},{"language":"es","tag":"Help Center","count":126},{"language":"fr","tag":"Help Center","count":126},{"language":"hi","tag":"Help Center","count":126},{"language":"ja","tag":"Help Center","count":126},{"language":"pt-BR","tag":"Help Center","count":126},{"language":"uk","tag":"Help Center","count":126},{"language":"vi","tag":"Help Center","count":126},{"language":"zh-Hans","tag":"Help Center","count":126},{"language":"zh-Hant","tag":"Help Center","count":126},{"language":"en","tag":"Ads","count":43},{"language":"ar","tag":"Ads","count":43},{"language":"de","tag":"Ads","count":43},{"language":"es","tag":"Ads","count":43},{"language":"fr","tag":"Ads","count":43},{"language":"hi","tag":"Ads","count":43},{"language":"ja","tag":"Ads","count":43},{"language":"pt-BR","tag":"Ads","count":43},{"language":"uk","tag":"Ads","count":43},{"language":"vi","tag":"Ads","count":43},{"language":"zh-Hans","tag":"Ads","count":43},{"language":"zh-Hant","tag":"Ads","count":43},{"language":"en","tag":"Additional","count":41},{"language":"ar","tag":"Additional","count":41},{"language":"de","tag":"Additional","count":41},{"language":"es","tag":"Additional","count":41},{"language":"fr","tag":"Additional","count":41},{"language":"hi","tag":"Additional","count":41},{"language":"ja","tag":"Additional","count":41},{"language":"pt-BR","tag":"Additional","count":41},{"language":"uk","tag":"Additional","count":41},{"language":"vi","tag":"Additional","count":41},{"language":"zh-Hans","tag":"Additional","count":41},{"language":"zh-Hant","tag":"Additional","count":41},{"language":"en","tag":"Technical Support","count":40},{"language":"ar","tag":"Technical Support","count":40},{"language":"de","tag":"Technical Support","count":40},{"language":"es","tag":"Technical Support","count":40},{"language":"fr","tag":"Technical Support","count":40},{"language":"hi","tag":"Technical Support","count":40},{"language":"ja","tag":"Technical Support","count":40},{"language":"pt-BR","tag":"Technical Support","count":40},{"language":"uk","tag":"Technical Support","count":40},{"language":"vi","tag":"Technical Support","count":40},{"language":"zh-Hans","tag":"Technical Support","count":40},{"language":"zh-Hant","tag":"Technical Support","count":40},{"language":"en","tag":"Post","count":22},{"language":"ar","tag":"Post","count":22},{"language":"de","tag":"Post","count":22},{"language":"es","tag":"Post","count":22},{"language":"fr","tag":"Post","count":22},{"language":"hi","tag":"Post","count":22},{"language":"ja","tag":"Post","count":22},{"language":"pt-BR","tag":"Post","count":22},{"language":"uk","tag":"Post","count":22},{"language":"vi","tag":"Post","count":22},{"language":"zh-Hans","tag":"Post","count":22},{"language":"zh-Hant","tag":"Post","count":22},{"language":"en","tag":"Dashboard","count":21},{"language":"ar","tag":"Dashboard","count":21},{"language":"de","tag":"Dashboard","count":21},{"language":"es","tag":"Dashboard","count":21},{"language":"fr","tag":"Dashboard","count":21},{"language":"hi","tag":"Dashboard","count":21},{"language":"ja","tag":"Dashboard","count":21},{"language":"pt-BR","tag":"Dashboard","count":21},{"language":"uk","tag":"Dashboard","count":21},{"language":"vi","tag":"Dashboard","count":21},{"language":"zh-Hans","tag":"Dashboard","count":21},{"language":"zh-Hant","tag":"Dashboard","count":21},{"language":"en","tag":"Product","count":16},{"language":"ar","tag":"Product","count":16},{"language":"de","tag":"Product","count":16},{"language":"es","tag":"Product","count":16},{"language":"fr","tag":"Product","count":16},{"language":"hi","tag":"Product","count":16},{"language":"ja","tag":"Product","count":16},{"language":"pt-BR","tag":"Product","count":16},{"language":"uk","tag":"Product","count":16},{"language":"vi","tag":"Product","count":16},{"language":"zh-Hans","tag":"Product","count":16},{"language":"zh-Hant","tag":"Product","count":16},{"language":"en","tag":"Facebook Ads","count":15},{"language":"ar","tag":"Facebook Ads","count":15},{"language":"de","tag":"Facebook Ads","count":15},{"language":"es","tag":"Facebook Ads","count":15},{"language":"fr","tag":"Facebook Ads","count":15},{"language":"hi","tag":"Facebook Ads","count":15},{"language":"ja","tag":"Facebook Ads","count":15},{"language":"pt-BR","tag":"Facebook Ads","count":15},{"language":"uk","tag":"Facebook Ads","count":15},{"language":"vi","tag":"Facebook Ads","count":15},{"language":"zh-Hans","tag":"Facebook Ads","count":15},{"language":"zh-Hant","tag":"Facebook Ads","count":15}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".center{display:block;margin-left:auto;margin-right:auto;max-width:100%;height:auto}.welcome-banner{margin-left:auto;margin-right:auto;max-width:100%;height:auto;border-radius:12px}.custom-bullets{padding-left:0}.custom-bullets li{position:relative;padding-left:1.5em;margin-bottom:0.75em;list-style-type:none;line-height:1.4}.custom-bullets li::before{content:\"\\2022\";color:#2266c2;position:absolute;left:0.5em;top:0}.custom-bullets li:last-child{margin-bottom:0}.custom-bullets li>*{margin-top:0;margin-bottom:0}ul ul{margin-left:20px}.custom-bullets li::after,.custom-bullets li::before{border:none!important;background:none!important}.button{background-color:#2266c2;color:#fff;padding:16px 24px;border-radius:8px;border:none;transition-duration:0.2s;margin-top:100px}.button:hover{background-color:#133e76;color:white}.button2{background-color:#fff;color:#2266c2;padding:16px 24px;border-radius:8px;border:1px solid #2266c2;transition-duration:0.2s}.button2:hover{background-color:#133e76;color:white}.video-container{width:100%;max-width:560px;margin:0 auto}.video-container iframe{width:100%;height:auto;aspect-ratio:16 / 9}.plan-tag-light{font-family:\"JetBrains Mono\", monospace;display:inline-block;padding:2px 6px;border-radius:4px;font-size:12px;color:#ffffff;background-color:#16171b;margin-right:10px}.plan-tag-dark{font-family:\"JetBrains Mono\", monospace;display:inline-block;padding:2px 6px;border-radius:4px;font-size:12px;color:#3f4144;background-color:#b7b9bb;margin-right:10px}@media (min-width: 768px){.video-container{display:flex;justify-content:center;align-items:center}}code{font-size:0.96em;line-height:1.7em}dialog.ayr-playground{padding:0;border:none;background:transparent;width:min(1100px, calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:auto;overflow-y:auto}dialog.ayr-playground::backdrop{background:rgb(3 7 18 / 0.6);backdrop-filter:blur(2px)}.ayr-playground-card{--ayr-border: rgb(3 7 18 / 0.1);--ayr-muted-bg: rgb(3 7 18 / 0.03);border:1px solid var(--ayr-border);border-radius:16px;background:rgb(var(--background-light));box-shadow:0 24px 48px -12px rgb(0 0 0 / 0.35)}.dark .ayr-playground-card{--ayr-border: rgb(255 255 255 / 0.1);--ayr-muted-bg: rgb(255 255 255 / 0.04);background:rgb(var(--background-dark))}.ayr-playground-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem 1rem 0.75rem 1.25rem}.ayr-playground-close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;color:rgb(107 114 128)}.ayr-playground-close:hover{background:var(--ayr-muted-bg);color:inherit}.ayr-playground-request{display:flex;align-items:stretch;gap:0.75rem;padding:0 1.25rem 1rem;border-bottom:1px solid var(--ayr-border)}.ayr-playground-url{display:flex;flex:1;min-width:0;align-items:center;gap:0.75rem;min-height:44px;padding:0 0.875rem;border:1px solid var(--ayr-border);border-radius:10px;background:var(--ayr-muted-bg)}.ayr-playground-send{flex-shrink:0;padding:0 1.25rem;border-radius:10px}.ayr-playground-url code{padding:0;border:none;background:none}.ayr-playground-method{flex-shrink:0;padding:0.125rem 0.5rem;border-radius:6px;background:rgb(34 197 94 / 0.15);color:rgb(21 128 61);font-size:0.75rem;font-weight:700}.dark .ayr-playground-method{color:rgb(74 222 128)}.ayr-playground-body{display:grid;gap:1.75rem;padding:1.25rem}@media (min-width: 768px){.ayr-playground-body{grid-template-columns:minmax(0, 5fr) minmax(0, 7fr)}}.ayr-playground-fields,.ayr-playground-output{display:flex;flex-direction:column;gap:1.5rem;min-width:0}.ayr-playground-section-title{display:flex;align-items:center;gap:0.5rem;margin-bottom:0.75rem;font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;color:rgb(107 114 128)}.ayr-playground-output .code-block,.ayr-playground-output .code-group{margin-top:0;margin-bottom:0}.ayr-playground-status{padding:0.0625rem 0.5rem;border-radius:9999px;font-size:0.75rem;letter-spacing:normal;text-transform:none}.ayr-playground-status.is-ok{background:rgb(34 197 94 / 0.15);color:rgb(21 128 61)}.ayr-playground-status.is-error{background:rgb(239 68 68 / 0.15);color:rgb(185 28 28)}.dark .ayr-playground-status.is-ok{color:rgb(74 222 128)}.dark .ayr-playground-status.is-error{color:rgb(248 113 113)}.ayr-playground-empty{padding:1.5rem 1rem;border:1px dashed var(--ayr-border);border-radius:12px;text-align:center;font-size:0.875rem;color:rgb(107 114 128)}.ayr-playground-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.dark .ayr-playground-section-title,.dark .ayr-playground-empty,.dark .ayr-playground-close{color:rgb(156 163 175)}.dark .ayr-playground-close:hover{color:inherit}"}]}
{"page":{"pagePath":"vi/dashboard/connect-social-accounts/x-twitter-byo-keys","slug":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys","pageMetadata":{"title":"Thiết lập X API Key của riêng bạn","description":"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,CodeGroup,Heading,Info,Note,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Vào ngày 31 tháng 3 năm 2026, X đã thay đổi cách các nền tảng bên thứ ba truy cập API của mình. Do đó, mọi tài khoản Ayrshare đăng bài lên X thông qua Ayrshare đều phải đăng ký X Developer App của riêng mình và sử dụng API Key cùng API Secret của app đó trên mọi request.`}),`\n`,_jsx(_components.p,{children:`Đây là thay đổi trên toàn nền tảng bắt buộc bởi X và ảnh hưởng đến tất cả các công cụ bên thứ ba.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`BYO keys được thiết lập một lần cho mỗi nền tảng (áp dụng cho toàn bộ tài khoản), không phải cho từng khách hàng hoặc sub-profile.`}),` Bạn tạo `,_jsx(_components.strong,{children:`một X Developer App`}),` dưới tài khoản X của mình, và cùng một `,_jsx(_components.strong,{children:`API Key + API Secret`}),` sẽ được áp dụng cho toàn bộ tài khoản X — chúng được sử dụng cho `,_jsx(_components.strong,{children:`mọi`}),` sub-profile / end-user liên kết X dưới tài khoản Ayrshare của bạn. Nếu bạn có gói Business hoặc Enterprise với hàng trăm sub-profile, bạn `,_jsx(_components.strong,{children:`không`}),` cần lặp lại thiết lập này cho từng cái. Bạn thiết lập một lần cho nền tảng X, sau đó truyền cùng hai header trong mỗi request.`]})}),`\n`,_jsx(_components.p,{children:`Chúng tôi đã đơn giản hoá quy trình thiết lập để bạn thực hiện dễ dàng nhất có thể, và việc này chỉ mất chưa đến 10 phút. Làm theo hướng dẫn từng bước dưới đây, và nếu bạn cần trợ giúp, đội ngũ của chúng tôi luôn sẵn sàng hỗ trợ.`}),`\n`,_jsx(Heading,{level:`2`,id:`bước-1-tạo-tài-khoản-x-developer`,children:`Bước 1: Tạo tài khoản X Developer`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Đăng nhập vào Developer Console`,children:[_jsxs(_components.p,{children:[`Truy cập `,_jsx(_components.a,{href:`https://console.x.com`,children:`console.x.com`}),` và đăng nhập bằng tài khoản X của bạn. Xem `,_jsx(_components.a,{href:`https://docs.x.com/x-api/getting-started/getting-access`,children:`hướng dẫn bắt đầu của X`}),` nếu bạn cần trợ giúp.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=58a00543db365d4d889722070643a070`,alt:`X Developer Console sign-in page`,\"data-og-width\":`1234`,\"data-og-height\":`803`,\"data-path\":`images/dashboard/x-byo-setup/step1-developer-console.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=938879f1e567194f28309da83fc13ee7 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8d06c7a4806c5fdc0ff5a000ce89b591 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8167e68f57c9d3d30eedd20482bac0d8 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=411376aafc312705b23976ea6b32e283 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=f20d8d63f8a31cdf0bd90aa256e47b65 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step1-developer-console.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=2f6031fe4744e4e7e4fb8943553eb191 2500w`})]}),_jsx(Step,{title:`Hoàn tất onboarding`,children:_jsx(_components.p,{children:`Hoàn tất onboarding cho developer và chấp nhận Developer Agreement cùng các chính sách.`})}),_jsx(Step,{title:`Truy cập console`,children:_jsx(_components.p,{children:`Bạn hiện đã ở trong X Developer Console.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-create-an-app`,children:`Bước 2: Tạo một App`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Bạn chỉ tạo `,_jsx(_components.strong,{children:`một X Developer App cho mỗi tài khoản Ayrshare`}),`. Cùng một app với API Key + API Secret sẽ được tái sử dụng cho mọi sub-profile / end-user mà sau này bạn liên kết dưới tài khoản Ayrshare của mình. Bạn không tạo app mới cho từng khách hàng.`]})}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Điều hướng đến Apps`,children:[_jsxs(_components.p,{children:[`Trong Developer Console, điều hướng đến `,_jsx(_components.strong,{children:`Apps`}),`.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=36076b8577cb46f4713cad41933bae2f`,alt:`Apps page in X Developer Console`,\"data-og-width\":`2048`,\"data-og-height\":`875`,\"data-path\":`images/dashboard/x-byo-setup/step2-apps-page.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=618a5b0a5c192d759d946bb84d30d97e 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=01a42a42982733035e31ddc1cc03908f 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=3ba5041fe7c38b74ee59e7225c7b2f4d 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=d3346daba4eac0bc05707d8d3b26174b 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8b8daa6f8dd11209fd40f89872b6303a 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-apps-page.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=e5a80b04de69e89259566f8e6f6f1db8 2500w`})]}),_jsxs(Step,{title:`Tạo app`,children:[_jsxs(_components.p,{children:[`Trong App dashboard, nhấp `,_jsx(_components.strong,{children:`Create App`}),` (xem `,_jsx(_components.a,{href:`https://docs.x.com/fundamentals/developer-apps`,children:`tài liệu thiết lập App của X`}),` để biết chi tiết). Nhập tên app (thường là tên thương hiệu của bạn). Tên này sẽ xuất hiện trên màn hình uỷ quyền OAuth khi người dùng kết nối tài khoản X của họ.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=dd9627eeb7e58c80f6249dd5cbfb0d4e`,alt:`Create App button in the X Developer Console`,\"data-og-width\":`2048`,\"data-og-height\":`947`,\"data-path\":`images/dashboard/x-byo-setup/step2-create-app.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=abb52ed3abce2fb2f6e127c7ce69a1cc 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=10d71bd1e512483a35bcb3b3832b9558 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=5e7df1f1f964f08cc14fd8456e0adb5a 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=61cfb7400f71483333293f5503280210 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=96e9795208e053de665d526b7abd7f8b 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-create-app.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=bd4cdf9107efb7cc20741f2126d81e54 2500w`})]}),_jsxs(Step,{title:`Chọn môi trường`,children:[_jsxs(_components.p,{children:[`Chọn môi trường `,_jsx(_components.strong,{children:`Production`}),` trong menu thả xuống.`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Dùng gói Pay-per-use.`}),` App của bạn phải nằm trong gói `,_jsx(_components.strong,{children:`Pay-per-use`}),`, ở môi trường `,_jsx(_components.strong,{children:`Production`}),`, không phải `,_jsx(_components.strong,{children:`Standalone`}),`. Nếu không, việc liên kết tài khoản X sẽ thất bại với lỗi 403 “Client Forbidden” (`,_jsx(_components.code,{children:`client-not-enrolled`}),`).`]})}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=2b111d840665b0b7eb96fc0d9df99f0e`,alt:`Production environment selection and credentials popup`,\"data-og-width\":`1109`,\"data-og-height\":`900`,\"data-path\":`images/dashboard/x-byo-setup/step2-credentials-popup.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=c8e37ddac31a20a0798ff7735cd59e9c 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=be02b3bc6d0d662ce9eb21f946dd870c 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=c71bebd542e27bceb80bd3adc0294f62 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=88fccea45ab7202760a09211941733dc 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=a2ea9f4c1955fbddb31dce812cd7f779 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step2-credentials-popup.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=537f94cee58e60756d29a5aead2dce57 2500w`})]}),_jsx(Step,{title:`Đóng cửa sổ pop-up credentials ban đầu`,children:_jsxs(_components.p,{children:[`X sẽ tạo một số credential. `,_jsx(_components.strong,{children:`Bỏ qua các credential này và đóng cửa sổ này lại.`})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-configure-app-permissions`,children:`Bước 3: Cấu hình quyền cho App`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Mở cài đặt app của bạn`,children:[_jsx(_components.p,{children:`Trong “Apps,” tìm app mới (làm mới trang nếu app không xuất hiện), sau đó nhấp vào nó để xem chi tiết.`}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=41f185aa2ffb4d90f0f9f174597cc4f1`,alt:`App details page in the X Developer Console`,\"data-og-width\":`2048`,\"data-og-height\":`937`,\"data-path\":`images/dashboard/x-byo-setup/step3-app-details.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=033178616425374ab2f1a47518398b3a 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8c75387800df2a54b4c1e1a9c2d63235 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=e52c65c0824faf161c693c7674e6e8cb 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8d6578e29681faab3b7a60806c2e3e43 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=9672f489ac7e262f65e3d6ca4dbe3866 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-details.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=90ab187dbc7b4dd68d3396d082cf170e 2500w`}),_jsxs(_components.p,{children:[`Trong `,_jsx(_components.strong,{children:`User authentication settings`}),`, nhấp `,_jsx(_components.strong,{children:`Set up`}),`.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=4faad9d5bc061f442ee0cc605e0aad6a`,alt:`User authentication settings, click Set up`,\"data-og-width\":`2048`,\"data-og-height\":`988`,\"data-path\":`images/dashboard/x-byo-setup/step3-user-auth-settings.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=114dcee67285e624649686f9af5b69da 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=edfcf1b336fddcb4fe76f443aace668f 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=88bfed4b63d47c3ee131faefd618bdaa 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=93fc2fc72f38d9722ac07314d934ff4b 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=39f7365bae71f1ecf74f31c5155e16e9 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-user-auth-settings.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=5050507e04eaf1f48b9165d48acae15a 2500w`})]}),_jsxs(Step,{title:`Thiết lập quyền cho app`,children:[_jsxs(_components.p,{children:[`Trong `,_jsx(_components.strong,{children:`App permissions`}),`, chọn `,_jsx(_components.strong,{children:`Read and write and Direct message`}),`. Điều này bắt buộc để hỗ trợ đầy đủ tính năng, bao gồm cả đăng bài và DM.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=57549ea060507af5b99552b6952ef95a`,alt:`App permissions set to Read and write and Direct message`,\"data-og-width\":`2048`,\"data-og-height\":`916`,\"data-path\":`images/dashboard/x-byo-setup/step3-app-permissions.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=967663e9221988a42f5240ee3b04a7fa 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=860fb7340e53f30de165d46cb504ae3a 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=a45de33c96315163857be3df57ad9753 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=4ba2ac9b9a8cafb254225077d62d87c3 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=a523bdc9a380a6cc6ce66effe823bd22 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-permissions.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=2aa1bc4175dc3562e7651b4e16964fa9 2500w`})]}),_jsxs(Step,{title:`Thiết lập loại app`,children:[_jsxs(_components.p,{children:[`Trong `,_jsx(_components.strong,{children:`Type of App`}),`, chọn `,_jsx(_components.strong,{children:`Web App, Automated App or Bot`}),`. Đây là lựa chọn đúng cho các tích hợp phía server như Ayrshare.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8609d048548432862ad801113e7b7b8e`,alt:`Type of App set to Web App, Automated App or Bot`,\"data-og-width\":`2042`,\"data-og-height\":`658`,\"data-path\":`images/dashboard/x-byo-setup/step3-app-type.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8cc5080d23a4f18a240245fba86ea825 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=067ef3d8de679b214db46083f8ef902f 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=2d6773c757e629dbd1baac07df398425 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=a0f6290ebdae9fe04416de5fb4ade368 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=03eec010d9d59dc1be31028fb7b92669 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-app-type.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=62a973daa73cd285b4d4889fae619140 2500w`})]}),_jsxs(Step,{title:`Thiết lập callback và website URL`,children:[_jsxs(_components.p,{children:[`Trong `,_jsx(_components.strong,{children:`App info`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Callback URL:`}),` Thêm cả hai callback URL sau:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://profile.ayrshare.com/social-accounts`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://app.ayrshare.com/social-accounts`})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Website URL:`}),` `,_jsx(_components.code,{children:`https://app.ayrshare.com`})]}),`\n`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Đừng bỏ qua bước này.`}),` Các callback URL này bắt buộc cho luồng liên kết OAuth. Khi người dùng cuối uỷ quyền kết nối X, X sẽ chuyển hướng họ về một trong các URL này để hoàn tất quy trình liên kết. Nếu thiếu, luồng OAuth sẽ thất bại với lỗi `,_jsx(_components.code,{children:`403 Callback URL not approved`}),`.`]})}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=09d7254aa2d183e2899f95412e97316b`,alt:`App info form with callback URL and website URL filled in`,\"data-og-width\":`908`,\"data-og-height\":`664`,\"data-path\":`images/dashboard/x-byo-setup/step3-app-info-urls.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=280\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=e4cd55b7c0e8e5b2e78f7f246486c6fe 280w, https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=560\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=0daa1d7c0cfe379ab26d73fd3999914b 560w, https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=840\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=57ed773de8d63058d7b63eedffcc9255 840w, https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=a641ad5ad76d12c1ec264a2c9def0a1a 1100w, https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=bdde71f24a7c1b009877ce3777b94486 1650w, https://mintcdn.com/ayrshare-docs/itktiDewCYTaymFN/images/dashboard/x-byo-setup/step3-app-info-urls.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=itktiDewCYTaymFN\u0026q=85\u0026s=ac8ea4413fff8494654603ed248f0f04 2500w`})]}),_jsx(Step,{title:`Lưu cài đặt`,children:_jsxs(_components.p,{children:[`Nhấp `,_jsx(_components.strong,{children:`Save`}),`. Bạn có thể bỏ qua cửa sổ pop-up OAuth 2.0, vì bạn chỉ sử dụng 2 khoá của OAuth 1.0 (API Key và API Secret).`]})})]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Quan trọng: Thiết lập quyền trước khi liên kết.`}),` Các quyền bạn chọn ở đây quyết định app của bạn có thể làm gì. Nếu bạn thay đổi quyền sau khi đã liên kết tài khoản X qua OAuth, bạn sẽ cần liên kết lại để Access Token mới kế thừa quyền đã cập nhật.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=761423c4c27f0c90b480d00f1ff253f7`,alt:`Keys and tokens page showing OAuth 1.0 keys with permission level`,\"data-og-width\":`926`,\"data-og-height\":`854`,\"data-path\":`images/dashboard/x-byo-setup/step3-keys-and-tokens.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=96fb3e63f604deca1038c523a85e2a0f 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=ce1be3557c7c5d0ebd418647267dc08a 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=03bebbf43dfd5f1520ecf0211ad5d7f4 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=03f9aeeec29de8366a5213a506ad45d3 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=8dbc09078b85136c43ab34a6ef44f5ad 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step3-keys-and-tokens.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=0b16c0a19d011377c192ef190c3edafd 2500w`})]}),`\n`,_jsx(_components.p,{children:`Hãy đảm bảo bạn lưu lại 2 khoá này:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Key`}),` (còn gọi là Consumer Key, định danh của X app)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Secret`}),` (còn gọi là Consumer Secret)`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Bạn `,_jsx(_components.strong,{children:`KHÔNG`}),` cần tạo Access Token thủ công. Ayrshare xử lý việc này tự động khi bạn liên kết tài khoản X qua OAuth.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`bước-4-mua-x-api-credits`,children:`Bước 4: Mua X API Credits`}),`\n`,_jsx(_components.p,{children:`X hiện dùng hệ thống thanh toán API dựa trên credit, được mua thông qua developer console.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Điều hướng đến billing`,children:[_jsxs(_components.p,{children:[`Trong Developer Console, nhấp `,_jsx(_components.strong,{children:`Billing → Credits`}),` ở thanh bên trái.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=b104e991f726ec2ecb8cc8274d1889d2`,alt:`Billing Credits page in X Developer Console`,\"data-og-width\":`2048`,\"data-og-height\":`885`,\"data-path\":`images/dashboard/x-byo-setup/step4-billing-credits.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=05857bceafa90c02bf795d8600c532d7 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=b169db58214681f1f028250953a19210 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=b041009571f7d6e3d6402ecab7ff0315 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=abb16fc8f0c380dbe8f7b1d606d65352 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=f22c4726b85514ded6f879cc09d9ce63 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-billing-credits.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=5172e62ed429e1aec41cb25dab287c1f 2500w`})]}),_jsxs(Step,{title:`Mua credits`,children:[_jsx(_components.p,{children:`Mua credits (mức tối thiểu là $5, đủ cho hàng trăm lệnh API). Mỗi lệnh gọi API chỉ tốn một phần nhỏ của một cent, vì vậy chi phí sẽ tối thiểu đối với hầu hết người dùng.`}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=ae555dc44bcfdfb0d7e4f55237b248ef`,alt:`Credit purchase page in the X Developer Console`,\"data-og-width\":`2048`,\"data-og-height\":`1050`,\"data-path\":`images/dashboard/x-byo-setup/step4-purchase-credits.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=880a3ca24b200671083b647a8e01c46f 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=1d4590391ebd4bb7fb25c3051c9c0915 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=7cf1371cc050e20e5dadf5bd0b48eb6d 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=fa7c584c07a7c2ae9034ebbff4a66143 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=fd4012882939b5f4f2f35a97edd836a0 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-purchase-credits.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=31445cf4987844d06fb7c8d989c51389 2500w`})]}),_jsxs(Step,{title:`Bật tự động nạp lại`,children:[_jsxs(_components.p,{children:[`Bạn có thể bật `,_jsx(_components.strong,{children:`auto-recharge`}),` để tránh gián đoạn dịch vụ và quản lý giới hạn chi tiêu bằng cách đặt mức tối đa bạn có thể chi trong chu kỳ thanh toán.`]}),_jsx(OptimizedImage,{class:`center`,width:`700`,src:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=c9e0f36c379bbd5c47c8b242213eaa6a`,alt:`Auto-recharge and spend cap settings in X Developer Console`,\"data-og-width\":`1832`,\"data-og-height\":`593`,\"data-path\":`images/dashboard/x-byo-setup/step4-auto-recharge.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=280\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=f7101537cfe4f11ad00731fb2a2aa367 280w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=560\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=3f3faaa4b77240d48d48c09acfd8799f 560w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=840\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=85708d9e27f8fd9b3f0d5dc290969eae 840w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=3453c9a1780bc8d1a3374d421a673fcf 1100w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=ab0b806605b208cb8e3b5a4cee307271 1650w, https://mintcdn.com/ayrshare-docs/qVYhhKC6hYCwYmRp/images/dashboard/x-byo-setup/step4-auto-recharge.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=qVYhhKC6hYCwYmRp\u0026q=85\u0026s=ef3fcae5d4f8e3d14a68ed50faaf8d23 2500w`})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Các lệnh gọi API của bạn sẽ thất bại nếu không có credits.`}),` API của X là pay-per-use. Nếu số dư credit của bạn bằng 0, mọi request API sẽ trả về lỗi `,_jsx(_components.code,{children:`402 CreditsDepleted`}),` với thông báo “Your enrolled account does not have any credits to fulfill this request.” Điều này bao gồm cả đăng bài, đọc tweet và tra cứu người dùng. Hãy nạp credits trước khi kiểm thử tích hợp của bạn. Xem `,_jsx(_components.a,{href:`#how-x-api-pricing-works`,children:`Cách định giá X API hoạt động`}),` để biết cập nhật đầy đủ về giá của X.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`bước-5-cập-nhật-các-lệnh-gọi-api-ayrshare-của-bạn`,children:`Bước 5: Cập nhật các lệnh gọi API Ayrshare của bạn`}),`\n`,_jsx(_components.p,{children:`Ở Bước 3, bạn đã lưu 2 mục sau một cách an toàn trong env, config hoặc secrets manager của riêng bạn:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Key`}),` (còn gọi là Consumer Key, định danh của X app)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Secret`}),` (còn gọi là Consumer Secret)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Bây giờ, hãy thêm thông tin xác thực X vào header của các lệnh gọi API Ayrshare.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Khóa của bạn vẫn được giữ riêng tư.`}),` API Key và API Secret bạn gửi trong các header này chỉ được dùng cho riêng yêu cầu đó và không được Ayrshare lưu lại. Việc tạo URL liên kết là ngoại lệ duy nhất, được mô tả trong mục Bảo mật bên dưới.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`header-reference`,children:`Tham chiếu Header`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Giá trị`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Key`})}),_jsx(_components.td,{children:`API Key (Consumer Key)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Secret`})}),_jsx(_components.td,{children:`API Key Secret (Consumer Secret)`})]})]})]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Cách nhận biết nếu quyền của bạn bị sai:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Nếu quyền của app bị cấu hình sai, request API có thể trả về lỗi `,_jsx(_components.code,{children:`403 Forbidden`}),` với thông báo: “Your client app is not configured with the appropriate OAuth1 app permissions.”`]}),`\n`]}),_jsxs(_components.p,{children:[`Nếu bạn thấy lỗi này, hãy cập nhật quyền của app thành `,_jsx(_components.strong,{children:`Read and write and Direct message`}),` trong X Developer Console, sau đó liên kết lại tài khoản X qua OAuth để Access Token mới kế thừa quyền đã cập nhật.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`ví-dụ-mã`,children:`Ví dụ mã`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.ayrshare.com/api/post`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_AYRSHARE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Key: your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Secret: your_api_secret\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"post\": \"Hello from my own X App!\", \"platforms\": [\"twitter\"]}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.ayrshare.com/api/post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer YOUR_AYRSHARE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`X_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`X_API_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` post:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hello from my own X App!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` platforms:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"twitter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer YOUR_AYRSHARE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Twitter-OAuth1-Api-Secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X_API_SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ayrshare.com/api/post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello from my own X App!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"platforms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"twitter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`Các quy trình tự động và workflow hiện có của bạn sẽ tiếp tục hoạt động miễn là bạn đưa header API Key và API Secret vào mọi request tới X.`}),`\n`,_jsx(Heading,{level:`3`,id:`migrating-existing-profiles-business--enterprise`,children:`Chuyển đổi các profile hiện có (Business \u0026 Enterprise)`}),`\n`,_jsx(_components.p,{children:`Nếu bạn có sub-profile đã được liên kết với X thông qua Ayrshare, các profile đó cần liên kết lại tài khoản X sau khi bạn chuyển sang BYO keys. Điều này là vì access token hiện có đã được cấp dưới X app của Ayrshare và không thể sử dụng với consumer key của bạn (chữ ký OAuth 1.0a bị ràng buộc với app cấp token).`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Đưa các khoá của bạn vào generateJWT`,children:[_jsxs(_components.p,{children:[`Thêm `,_jsx(_components.code,{children:`twitterApiKey`}),` và `,_jsx(_components.code,{children:`twitterApiSecret`}),` vào body của lệnh gọi `,_jsx(_components.a,{href:`/apis/profiles/generate-jwt#body-parameters`,children:`generateJWT`}),`. Chúng được mã hóa và lưu cùng với session liên kết, và không bị lộ cho người dùng cuối của bạn.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"profileKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"twitterApiKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_X_CONSUMER_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"twitterApiSecret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_X_CONSUMER_SECRET\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Tạo URL liên kết là trường hợp duy nhất consumer key của bạn nằm trong body: lệnh gọi này, hoặc `,_jsx(_components.a,{href:`/apis/profiles/create-link-session`,children:_jsx(_components.code,{children:`POST /profiles/link-sessions`})}),`. Mọi yêu cầu X khác đều dùng các header mô tả ở trên.`]})]}),_jsxs(Step,{title:`Yêu cầu người dùng liên kết lại X`,children:[_jsx(_components.p,{children:`Sau khi tạo JWT với các khoá được đưa vào, người dùng của bạn cần kết nối lại tài khoản X thông qua trang liên kết profile. Màn hình chấp thuận OAuth giờ sẽ hiển thị tên app của bạn thay vì của Ayrshare.`}),_jsx(_components.p,{children:`Để làm mọi việc đơn giản hơn, bạn có thể:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Huỷ liên kết tài khoản theo cách lập trình qua `,_jsx(_components.a,{href:`/apis/profiles/unlink-social-network`,children:`Unlink API`}),`, sau đó yêu cầu người dùng uỷ quyền lại`]}),`\n`,_jsxs(_components.li,{children:[`Sử dụng `,_jsxs(_components.a,{href:`/apis/profiles/generate-jwt#param-logout`,children:[_jsx(_components.code,{children:`logout`}),` parameter`]}),` trong generateJWT để buộc đăng nhập mới`]}),`\n`,_jsxs(_components.li,{children:[`Sử dụng `,_jsx(_components.a,{href:`/apis/profiles/generate-jwt#param-allowed-social`,children:_jsx(_components.code,{children:`allowedSocial`})}),` để chỉ hiển thị X trên trang liên kết trong luồng chuyển đổi`]}),`\n`]})]}),_jsx(Step,{title:`Tiếp tục gửi header trên tất cả các lệnh gọi API`,children:_jsxs(_components.p,{children:[`Sau khi liên kết lại, tiếp tục đưa các header `,_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Key`}),` và `,_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Secret`}),` vào mọi lệnh gọi API (đăng bài, analytics, comments, v.v.).`]})})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Sau khi một profile đã liên kết lại dưới X app của bạn, tất cả các bài đăng tiếp theo cho profile đó sẽ sử dụng thông tin xác thực của bạn. Bạn có thể xác minh điều này bằng cách kiểm tra trang Usage trong `,_jsx(_components.a,{href:`https://console.x.com`,children:`X Developer Console`}),` của bạn.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`kiểm-tra-thiết-lập-của-bạn`,children:`Kiểm tra thiết lập của bạn`}),`\n`,_jsxs(_components.p,{children:[`Thực hiện một lệnh gọi thử qua Ayrshare API với các header mới để xác nhận mọi thứ đang hoạt động. Endpoint `,_jsx(_components.a,{href:`/apis/analytics/social`,children:`/analytics/social`}),` là một bài kiểm tra nhẹ tốt, vì nó không tạo bài đăng nào.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-x-api-pricing-works`,children:`Cách định giá X API hoạt động`}),`\n`,_jsx(_components.p,{children:`Trước đây, Ayrshare chi trả cho việc sử dụng API của X thay bạn. Theo mô hình hiện tại của X, mỗi khách hàng Ayrshare duy trì tài khoản X Developer của riêng mình và trả tiền trực tiếp cho X cho các request API mà ứng dụng của họ thực hiện. (Một tài khoản X Developer trên mỗi tài khoản Ayrshare, không phải trên mỗi end-user. Tất cả sub-profile của bạn dùng chung một tài khoản X Developer và số dư credit.)`}),`\n`,_jsx(_components.p,{children:`Mô hình định giá của X là pay-per-use: bạn mua credit trong X Developer Console, và chúng bị trừ khi các request API được thực hiện. Không cần hợp đồng hay đăng ký gói.`}),`\n`,_jsx(_components.p,{children:`Các tác vụ điển hình có chi phí thấp. Ví dụ:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tác vụ`}),_jsx(_components.th,{children:`Chi phí xấp xỉ`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tạo bài đăng (chỉ văn bản)`}),_jsx(_components.td,{children:`~$0.01 mỗi bài`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tạo bài đăng có media`}),_jsx(_components.td,{children:`~$0.02 mỗi bài (upload media và tạo bài đăng là các request riêng biệt)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Đọc một bài đăng`}),_jsx(_components.td,{children:`~$0.005 mỗi lượt đọc`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tra cứu người dùng`}),_jsx(_components.td,{children:`~$0.01 mỗi lượt tra cứu`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Gửi DM`}),_jsx(_components.td,{children:`~$0.01 mỗi tin nhắn`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Đọc sự kiện DM`}),_jsx(_components.td,{children:`~$0.01 mỗi sự kiện`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tương tác người dùng (follow, like, v.v.)`}),_jsx(_components.td,{children:`~$0.015 mỗi request`})]})]})]}),`\n`,_jsx(_components.p,{children:`Để tham khảo, nếu bạn đăng khoảng 100 lần mỗi tháng, chi phí trực tiếp cho X sẽ vào khoảng $1, và các bài đăng có media sẽ khoảng $2 mỗi tháng.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Định giá pay-per-use của X hiện đang trong giai đoạn thử nghiệm. Tỷ giá có thể thay đổi và có thể có chi phí bổ sung. Luôn kiểm tra Developer Console để biết định giá mới nhất. Xem `,_jsx(_components.a,{href:`https://docs.x.com/x-api/fundamentals/pricing`,children:`phân tích thông tin định giá của X`}),`.`]})}),`\n`,_jsx(_components.p,{children:`Chúng tôi biết điều này giới thiệu một khoản chi phí chưa từng tồn tại trước đây, và chúng tôi muốn minh bạch về điều đó. Đồng thời, mô hình này cũng mở ra một số lợi ích không thể có trong thiết lập chia sẻ khoá trước đây.`}),`\n`,_jsx(Heading,{level:`2`,id:`lợi-ích-của-việc-dùng-x-api-key-của-riêng-bạn`,children:`Lợi ích của việc dùng X API Key của riêng bạn`}),`\n`,_jsx(_components.p,{children:`Việc sử dụng thông tin xác thực X API của riêng bạn cung cấp khả năng kiểm soát và độ tin cậy tốt hơn so với mô hình chia sẻ khoá trước đây. Bao gồm:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Trải nghiệm OAuth có thương hiệu:`}),` Người dùng thấy tên app và thương hiệu của bạn khi uỷ quyền truy cập X.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Giới hạn tốc độ riêng:`}),` Việc sử dụng API của bạn được điều chỉnh bởi giới hạn của tài khoản X Developer của riêng bạn, tách biệt khỏi các người dùng Ayrshare khác. Bạn có thể theo dõi sử dụng của mình trong `,_jsx(_components.a,{href:`https://console.x.com`,children:`X Developer Console`}),` và xem `,_jsx(_components.a,{href:`https://developer.x.com/en/docs/x-api/rate-limits`,children:`tài liệu về giới hạn tốc độ API của X`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Kiểm soát thông tin xác thực:`}),` API Key và Secret của bạn vẫn nằm trong tài khoản X Developer của chính bạn. Ayrshare không lưu các khóa bạn gửi trong header của yêu cầu. Việc tạo URL liên kết là ngoại lệ duy nhất, được mô tả trong mục Bảo mật bên dưới.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tính di động:`}),` Vì người dùng xác thực với X App của bạn, tích hợp của bạn vẫn hoàn toàn nằm dưới sự kiểm soát của bạn.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Khả năng hiển thị sử dụng:`}),` Dashboard X Developer của bạn hiển thị các request API, giới hạn tốc độ và mức sử dụng credit.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`X là nền tảng đầu tiên yêu cầu mô hình này, nhưng ngày càng nhiều nền tảng đang hướng tới “bring your own API key.” Chúng tôi đang mở rộng khả năng này trên toàn Ayrshare, để các developer có cùng khả năng kiểm soát và độc lập trên tất cả các nền tảng mạng xã hội.`}),`\n`,_jsx(Heading,{level:`2`,id:`bảo-mật`,children:`Bảo mật`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`API Key và API Secret bạn gửi trong header của yêu cầu chỉ được dùng cho riêng yêu cầu đó và không được Ayrshare lưu lại.`}),`\n`,_jsxs(_components.li,{children:[`Việc tạo URL liên kết là ngoại lệ. Khi bạn gửi `,_jsx(_components.code,{children:`twitterApiKey`}),` và `,_jsx(_components.code,{children:`twitterApiSecret`}),` tới `,_jsx(_components.a,{href:`/apis/profiles/generate-jwt`,children:_jsx(_components.code,{children:`POST /profiles/generateJWT`})}),` hoặc `,_jsx(_components.a,{href:`/apis/profiles/create-link-session`,children:_jsx(_components.code,{children:`POST /profiles/link-sessions`})}),`, cặp khóa này được mã hóa và lưu cùng với session liên kết đó, vì trang liên kết cần đến nó khi người dùng của bạn cấp quyền cho X ngay sau đó. Nó được xóa khi bạn `,_jsx(_components.a,{href:`/apis/profiles/revoke-link-session`,children:`thu hồi liên kết`}),`, hoặc khi một liên kết đã hết hạn được mở hay kiểm tra lần kế tiếp, và trong mọi trường hợp sẽ bị xóa cùng với bản ghi session trong vòng 30 ngày.`]}),`\n`,_jsxs(_components.li,{children:[`Về các thực hành bảo mật chung, xem `,_jsx(_components.a,{href:`https://docs.x.com/resources/fundamentals/authentication`,children:`hướng dẫn bảo mật xác thực của X`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`câu-hỏi-thường-gặp`,children:`Câu hỏi thường gặp`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Tôi có cần thiết lập điều này cho mỗi khách hàng / sub-profile không?`,id:`toi-co-can-thiet-lap-dieu-nay-cho-moi-khach-hang-sub-profile-khong`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Không.`}),` Bạn thiết lập `,_jsx(_components.strong,{children:`một`}),` X Developer App dưới tài khoản X của mình, và cùng một `,_jsx(_components.strong,{children:`API Key + API Secret`}),` được tái sử dụng cho mọi sub-profile / end-user bạn liên kết dưới tài khoản Ayrshare của mình.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Bạn tạo X Developer App `,_jsx(_components.strong,{children:`một lần`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Bạn truyền cùng hai header (`,_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Key`}),` và `,_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Secret`}),`) trong mỗi lệnh gọi API Ayrshare, bất kể lệnh gọi đó dành cho sub-profile nào.`]}),`\n`,_jsxs(_components.li,{children:[`Các end-user của bạn vẫn phải trải qua luồng liên kết OAuth để uỷ quyền tài khoản X của họ, nhưng họ `,_jsx(_components.strong,{children:`không`}),` cần X Developer App hay API key của riêng họ. Họ kết nối thông qua app của bạn.`]}),`\n`,_jsx(_components.li,{children:`Tất cả sub-profile chia sẻ cùng một tài khoản X Developer, cùng giới hạn tốc độ và cùng số dư credit.`}),`\n`]}),_jsxs(_components.p,{children:[`Lần duy nhất bạn xử lý khoá cho từng profile là trong body `,_jsx(_components.a,{href:`/apis/profiles/generate-jwt`,children:`generateJWT`}),` trong quá trình chuyển đổi, và đó vẫn là cùng hai khoá của bạn, chỉ được gửi đến trang liên kết để end-user có thể uỷ quyền lại dưới app của bạn.`]})]}),_jsx(Accordion,{title:`Yêu cầu về X API key đã có hiệu lực chưa?`,id:`yeu-cau-ve-x-api-key-da-co-hieu-luc-chua`,children:_jsx(_components.p,{children:`Có. Từ ngày 31 tháng 3 năm 2026, tất cả các hoạt động X thông qua Ayrshare đều yêu cầu thông tin xác thực X API của riêng bạn. Nếu bạn chưa thiết lập tài khoản X Developer, hãy làm theo các bước trên.`})}),_jsx(Accordion,{title:`Điều gì xảy ra nếu tôi không thêm X API key vào Ayrshare?`,id:`dieu-gi-xay-ra-neu-toi-khong-them-x-api-key-vao-ayrshare`,children:_jsx(_components.p,{children:`Việc đăng bài lên X thông qua Ayrshare yêu cầu thông tin xác thực X API của riêng bạn. Các request không có thông tin BYO hợp lệ sẽ bị từ chối. Việc đăng bài lên các nền tảng khác (Instagram, LinkedIn, Facebook, TikTok, v.v.) không bị ảnh hưởng.`})}),_jsx(Accordion,{title:`X API có giá bao nhiêu?`,id:`x-api-co-gia-bao-nhieu`,children:_jsxs(_components.p,{children:[`X tính phí cho mỗi lệnh gọi API. Tạo một bài đăng tốn khoảng $0.01, và đọc một bài đăng tốn khoảng $0.005. Ví dụ, xuất bản 100 bài đăng mỗi tháng sẽ tốn khoảng $1. Xem `,_jsx(_components.a,{href:`https://docs.x.com/x-api/fundamentals/pricing`,children:`trang định giá của X`}),` để biết chi tiết đầy đủ.`]})}),_jsx(Accordion,{title:`Điều này có thay đổi giá gói đăng ký Ayrshare của tôi không?`,id:`dieu-nay-co-thay-doi-gia-goi-dang-ky-ayrshare-cua-toi-khong`,children:_jsx(_components.p,{children:`Không. Giá gói đăng ký Ayrshare của bạn không đổi. Chi phí bổ sung duy nhất là phí sử dụng X API được X tính trực tiếp qua tài khoản developer của bạn.`})}),_jsx(Accordion,{title:`Ayrshare có lưu trữ thông tin xác thực X API của tôi không?`,id:`ayrshare-co-luu-tru-thong-tin-xac-thuc-x-api-cua-toi-khong`,children:_jsxs(_components.p,{children:[`Với các yêu cầu API thông thường thì không: API Key và API Secret bạn gửi trong header chỉ được dùng cho riêng yêu cầu đó và không được lưu lại. Việc tạo URL liên kết là ngoại lệ, vì trang liên kết cần cặp khóa này khi người dùng của bạn cấp quyền cho X. Ở đó nó được mã hóa và lưu cùng với session liên kết, rồi được xóa khi bạn `,_jsx(_components.a,{href:`/apis/profiles/revoke-link-session`,children:`thu hồi liên kết`}),`, khi một liên kết đã hết hạn được mở hay kiểm tra lần kế tiếp, hoặc cùng với bản ghi session trong vòng 30 ngày. Xem mục Bảo mật ở trên, và `,_jsx(_components.a,{href:`https://docs.x.com/resources/fundamentals/authentication`,children:`hướng dẫn bảo mật xác thực của X`}),` để biết các thực hành chung.`]})}),_jsxs(Accordion,{title:`Tôi đã có tài khoản X Developer. Tôi có thể dùng khoá hiện có không?`,id:`toi-da-co-tai-khoan-x-developer-toi-co-the-dung-khoa-hien-co-khong`,children:[_jsx(_components.p,{children:`Có. Bạn có thể sử dụng X App hiện có miễn là nó đã bật quyền “Read and write” (và Direct Messages nếu bạn sử dụng tính năng DM).`}),_jsx(_components.p,{children:`Bạn sẽ cần API Key (Consumer Key) và API Secret (Consumer Secret) từ phần Keys and tokens của X Developer Console. Liên kết tài khoản X qua OAuth, sau đó đưa 2 header này vào các request API Ayrshare.`}),_jsx(_components.p,{children:`Nếu bạn đã thay đổi quyền của app kể từ lúc thiết lập ban đầu, hãy liên kết lại tài khoản X để Access Token kế thừa quyền đã cập nhật.`})]}),_jsx(Accordion,{title:`X Developer Portal hiển thị nhiều thông tin xác thực. Tôi thực sự cần cái nào?`,id:`x-developer-portal-hien-thi-nhieu-thong-tin-xac-thuc-toi-thuc-su-can-cai-nao`,children:_jsxs(_components.p,{children:[`Bạn cần API Key (Consumer Key) và API Secret (Consumer Secret). Xem `,_jsx(_components.a,{href:`#header-reference`,children:`bảng tham chiếu header`}),` ở trên để biết chính xác mỗi cái ánh xạ đến header nào của Ayrshare. Bạn có thể bỏ qua Client ID, Client Secret, Bearer Token, Access Token và Access Token Secret.`]})}),_jsxs(Accordion,{title:`Sự khác biệt giữa 'API Key' và 'Client ID' là gì?`,id:`su-khac-biet-giua-api-key-va-client-id-la-gi`,children:[_jsx(_components.p,{children:`Chúng là các thông tin xác thực hoàn toàn khác nhau cho các phương thức xác thực khác nhau:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API Key`}),` (còn gọi là “Consumer Key”) dành cho OAuth 1.0a. API Key (Consumer Key) + API Secret là những gì Ayrshare sử dụng. Nó hoạt động với tất cả tính năng của X, token không hết hạn và không cần logic refresh.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Client ID`}),` dành cho OAuth 2.0. Bạn KHÔNG cần cái này cho Ayrshare. Token OAuth 2.0 hết hạn sau một thời gian ngắn và yêu cầu quản lý refresh token.`]}),`\n`]}),_jsx(_components.p,{children:`Đối với Ayrshare, bạn chỉ cần API Key và API Secret. Bạn có thể bỏ qua Client ID, Client Secret và Bearer Token.`})]}),_jsx(Accordion,{title:`Tại sao là OAuth 1.0a mà không phải OAuth 2.0?`,id:`tai-sao-la-oauth-1-0a-ma-khong-phai-oauth-2-0`,children:_jsx(_components.p,{children:`Access token OAuth 2.0 hết hạn sau mỗi 2 giờ và refresh token của X chỉ dùng được một lần (mỗi lần refresh vô hiệu hoá token cũ). Điều này khiến không thể hỗ trợ mô hình BYO stateless, đặc biệt là cho các bài đăng đã lên lịch. Token OAuth 1.0a không hết hạn, hoạt động với tất cả tính năng của X và không cần quản lý token.`})}),_jsx(Accordion,{title:`Người dùng hiện có của tôi có cần liên kết lại tài khoản X không?`,id:`nguoi-dung-hien-co-cua-toi-co-can-lien-ket-lai-tai-khoan-x-khong`,children:_jsxs(_components.p,{children:[`Có. Nếu người dùng của bạn đã liên kết X qua Ayrshare trước khi bạn thiết lập BYO keys, họ sẽ cần kết nối lại. Access token hiện có đã được cấp dưới X app của Ayrshare và sẽ không hoạt động với consumer key của bạn. Xem `,_jsx(_components.a,{href:`#migrating-existing-profiles-business--enterprise`,children:`Chuyển đổi các profile hiện có`}),` ở trên để biết quy trình từng bước.`]})}),_jsx(Accordion,{title:`Thay đổi này có ảnh hưởng đến việc đăng bài lên Instagram, LinkedIn hoặc các nền tảng khác không?`,id:`thay-doi-nay-co-anh-huong-den-viec-dang-bai-len-instagram-linkedin-hoac-cac-nen-tang-khac-khong`,children:_jsx(_components.p,{children:`Không. Thay đổi này chỉ ảnh hưởng đến việc đăng bài lên X. Tất cả các tích hợp nền tảng khác trong Ayrshare tiếp tục hoạt động như thường lệ.`})}),_jsxs(Accordion,{title:`Còn tự động đăng RSS/Feed lên X thì sao?`,id:`con-tu-dong-dang-rss-feed-len-x-thi-sao`,children:[_jsx(_components.p,{children:`Không còn hỗ trợ tự động đăng RSS lên X. Nguồn cấp RSS chạy tự động theo lịch, nhưng mô hình bring-your-own API key yêu cầu thông tin xác thực phải được cung cấp với mỗi request API. Vì vậy, các nguồn cấp RSS không thể xác thực khi bài đăng được gửi.`}),_jsxs(_components.p,{children:[`Nếu bạn trước đây đã dùng RSS để đăng lên X, chúng tôi khuyến nghị chuyển sang `,_jsx(_components.a,{href:`/apis/post/overview#schedule-posts`,children:`bài đăng đã lên lịch`}),` hoặc các lệnh gọi API trực tiếp có bao gồm thông tin xác thực của bạn. Tự động đăng RSS lên tất cả các nền tảng khác không thay đổi.`]})]}),_jsx(Accordion,{title:`Tại sao tôi nhận được lỗi 402 \"CreditsDepleted\"?`,id:`tai-sao-toi-nhan-duoc-loi-402-creditsdepleted`,children:_jsxs(_components.p,{children:[`Điều này có nghĩa là tài khoản X Developer của bạn không còn credit API nào. Đi tới `,_jsx(_components.a,{href:`https://console.x.com`,children:`console.x.com`}),` → `,_jsx(_components.strong,{children:`Billing → Credits`}),` và mua credit. Ngay cả $5 cũng đủ cho hàng trăm lệnh gọi API. Khi credit đã được nạp, hãy thử lại request của bạn.`]})}),_jsxs(Accordion,{title:`Tại sao tôi nhận được lỗi 403 \"Forbidden: OAuth1 App Permissions\"?`,id:`tai-sao-toi-nhan-duoc-loi-403-forbidden-oauth1-app-permissions`,children:[_jsx(_components.p,{children:`Access Token của bạn không có quyền phù hợp. Điều này thường có nghĩa là một trong hai điều:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Quyền của app được thiết lập là “Read” thay vì “Read and write.”`}),` Đi tới Settings của app trong Developer Console và đổi thành `,_jsx(_components.strong,{children:`Read and write and Direct message`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bạn đã thay đổi quyền sau khi liên kết tài khoản X.`}),` Access Token giữ quyền tại thời điểm được tạo. Liên kết lại tài khoản X qua OAuth để token mới kế thừa quyền đã cập nhật.`]}),`\n`]})]}),_jsx(Accordion,{title:`Nếu tôi cần trợ giúp thiết lập thì sao?`,id:`neu-toi-can-tro-giup-thiet-lap-thi-sao`,children:_jsxs(_components.p,{children:[`Đội ngũ hỗ trợ của chúng tôi rất sẵn lòng giúp đỡ. Nếu bạn có câu hỏi hoặc gặp vấn đề trong quá trình thiết lập, vui lòng liên hệ qua `,_jsx(_components.a,{href:`mailto:support@ayrshare.com`,children:`support@ayrshare.com`}),`, và chúng tôi sẽ hướng dẫn bạn qua từng bước.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Xử lý sự cố`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Tôi gặp lỗi 400 về việc thiếu header`,id:`toi-gap-loi-400-ve-viec-thieu-header`,children:[_jsx(_components.p,{children:`Hãy chắc chắn bạn đang gửi cả hai header bắt buộc:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Key`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`X-Twitter-OAuth1-Api-Secret`})}),`\n`]}),_jsx(_components.p,{children:`Nếu bạn thấy lỗi thiếu cặp (ví dụ: “You provided Api-Key but not Api-Secret”), điều đó có nghĩa là một trong hai bị thiếu. Cả hai luôn bắt buộc.`}),_jsx(_components.p,{children:`Thông báo lỗi sẽ cho bạn biết header cụ thể nào bị thiếu.`})]}),_jsxs(Accordion,{title:`Tôi gặp lỗi 403: \"Callback URL not approved\"`,children:[_jsx(_components.p,{children:`Nếu bạn thấy lỗi này khi cố gắng liên kết tài khoản X, hãy chắc chắn bạn đã thêm các callback URL bắt buộc vào cài đặt X Developer App của bạn (trong Authentication settings > Callback URI / Redirect URL):`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://profile.ayrshare.com/social-accounts`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://app.ayrshare.com/social-accounts`})}),`\n`]}),_jsxs(_components.p,{children:[`Xem `,_jsx(_components.a,{href:`#step-3-configure-app-permissions`,children:`bước thiết lập Callback URL`}),` ở trên.`]})]}),_jsx(Accordion,{title:`Tôi gặp lỗi 402: \"CreditsDepleted\"`,children:_jsxs(_components.p,{children:[`Tài khoản X Developer của bạn không có credit API nào được nạp. Đi tới `,_jsx(_components.a,{href:`https://console.x.com`,children:`console.x.com`}),` → `,_jsx(_components.strong,{children:`Billing → Credits`}),` và mua credit. Ngay cả $5 cũng đủ cho hàng trăm lệnh gọi API.`]})}),_jsxs(Accordion,{title:`Tôi gặp lỗi 403: \"oauth1 app permissions\"`,children:[_jsx(_components.p,{children:`Access Token của bạn không có quyền phù hợp. Điều này thường có nghĩa là:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Quyền của app được thiết lập là “Read” thay vì “Read and write.”`}),` Đi tới Settings của app trong Developer Console và đổi thành `,_jsx(_components.strong,{children:`Read and write and Direct message`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bạn đã thay đổi quyền sau khi liên kết tài khoản X.`}),` Access Token giữ quyền tại thời điểm được tạo. Liên kết lại tài khoản X qua OAuth để token mới kế thừa quyền đã cập nhật.`]}),`\n`]})]}),_jsxs(Accordion,{title:`Tôi gặp lỗi 403: \"Client Forbidden\" (client-not-enrolled)`,children:[_jsxs(_components.p,{children:[`App X của bạn chưa được đăng ký cho X API v2. Điều này xảy ra khi app nằm trong gói `,_jsx(_components.strong,{children:`Standalone`}),`.`]}),_jsxs(_components.p,{children:[`Trong X Developer Console, chuyển app từ `,_jsx(_components.strong,{children:`Standalone`}),` sang gói `,_jsx(_components.strong,{children:`Pay-per-use`}),` (môi trường `,_jsx(_components.strong,{children:`Production`}),`), sau đó liên kết lại tài khoản X. Xem `,_jsx(_components.a,{href:`#step-2-create-an-app`,children:`Bước 2: Tạo một App`}),` ở trên.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`cần-trợ-giúp`,children:`Cần trợ giúp?`}),`\n`,_jsxs(_components.p,{children:[`Nếu bạn có câu hỏi hoặc gặp vấn đề khi thiết lập X API key, đội ngũ kỹ thuật của chúng tôi rất sẵn lòng giúp đỡ. Bạn có thể liên hệ với chúng tôi bất cứ lúc nào tại `,_jsx(_components.a,{href:`mailto:support@ayrshare.com`,children:`support@ayrshare.com`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Thiết lập X API Key của riêng bạn","description":"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Bước 1: Tạo tài khoản X Developer","slug":"bước-1-tạo-tài-khoản-x-developer","depth":2,"children":[]},{"title":"Bước 2: Tạo một App","slug":"step-2-create-an-app","depth":2,"children":[]},{"title":"Bước 3: Cấu hình quyền cho App","slug":"step-3-configure-app-permissions","depth":2,"children":[]},{"title":"Bước 4: Mua X API Credits","slug":"bước-4-mua-x-api-credits","depth":2,"children":[]},{"title":"Bước 5: Cập nhật các lệnh gọi API Ayrshare của bạn","slug":"bước-5-cập-nhật-các-lệnh-gọi-api-ayrshare-của-bạn","depth":2,"children":[{"title":"Tham chiếu Header","slug":"header-reference","depth":3,"children":[]},{"title":"Ví dụ mã","slug":"ví-dụ-mã","depth":3,"children":[]},{"title":"Chuyển đổi các profile hiện có (Business \u0026 Enterprise)","slug":"migrating-existing-profiles-business--enterprise","depth":3,"children":[]},{"title":"Kiểm tra thiết lập của bạn","slug":"kiểm-tra-thiết-lập-của-bạn","depth":3,"children":[]}]},{"title":"Cách định giá X API hoạt động","slug":"how-x-api-pricing-works","depth":2,"children":[]},{"title":"Lợi ích của việc dùng X API Key của riêng bạn","slug":"lợi-ích-của-việc-dùng-x-api-key-của-riêng-bạn","depth":2,"children":[]},{"title":"Bảo mật","slug":"bảo-mật","depth":2,"children":[]},{"title":"Câu hỏi thường gặp","slug":"câu-hỏi-thường-gặp","depth":2,"children":[]},{"title":"Xử lý sự cố","slug":"troubleshooting","depth":2,"children":[]},{"title":"Cần trợ giúp?","slug":"cần-trợ-giúp","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/ayrshare-docs/80ea29d8530ebaa2/script.js","/docs/_mintlify/custom/ayrshare-docs/3e93073b19ca64e9/tools/maintainScroll.js"],"subdomain":"ayrshare-docs","siteName":"Ayrshare Docs","title":"Thiết lập X API Key của riêng bạn - Ayrshare Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"es":{"href":"/es/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"cn":{"href":"/cn/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1,"hidden":true},"zh":{"href":"/zh/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1,"hidden":true},"pt-BR":{"href":"/pt-BR/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"fr":{"href":"/fr/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"de":{"href":"/de/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"vi":{"href":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":0},"ja":{"href":"/ja/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"uk":{"href":"/uk/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"hi":{"href":"/hi/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"ar":{"href":"/ar/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"zh-Hans":{"href":"/zh-Hans/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/dashboard/connect-social-accounts/x-twitter-byo-keys","matchLevel":1}}},"lastModified":"2026-11-23T12:46:02.007Z","originalFileLocation":"vi/dashboard/connect-social-accounts/x-twitter-byo-keys.mdx","locale":"vi"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Thiết lập X API Key của riêng bạn - Ayrshare Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ayrshare-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Connect+Social+Accounts\u0026amp;title=Thi%E1%BA%BFt+l%E1%BA%ADp+X+API+Key+c%E1%BB%A7a+ri%C3%AAng+b%E1%BA%A1n\u0026amp;description=H%C6%B0%E1%BB%9Bng+d%E1%BA%ABn+t%E1%BB%ABng+b%C6%B0%E1%BB%9Bc+%C4%91%E1%BB%83+k%E1%BA%BFt+n%E1%BB%91i+th%C3%B4ng+tin+x%C3%A1c+th%E1%BB%B1c+X+%28Twitter%29+API+c%E1%BB%A7a+b%E1%BA%A1n+v%E1%BB%9Bi+Ayrshare\u0026amp;theme=722a7095c53b95fd5a0669f2\u0026amp;signature=3dfbe68cbb4a3246030c3f4eeb47f4b8ee1ec3adc6358948b4a2d1737b326ac5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Thiết lập X API Key của riêng bạn - Ayrshare Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ayrshare-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Connect+Social+Accounts\u0026amp;title=Thi%E1%BA%BFt+l%E1%BA%ADp+X+API+Key+c%E1%BB%A7a+ri%C3%AAng+b%E1%BA%A1n\u0026amp;description=H%C6%B0%E1%BB%9Bng+d%E1%BA%ABn+t%E1%BB%ABng+b%C6%B0%E1%BB%9Bc+%C4%91%E1%BB%83+k%E1%BA%BFt+n%E1%BB%91i+th%C3%B4ng+tin+x%C3%A1c+th%E1%BB%B1c+X+%28Twitter%29+API+c%E1%BB%A7a+b%E1%BA%A1n+v%E1%BB%9Bi+Ayrshare\u0026amp;theme=722a7095c53b95fd5a0669f2\u0026amp;signature=3dfbe68cbb4a3246030c3f4eeb47f4b8ee1ec3adc6358948b4a2d1737b326ac5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2266C2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"vi\" href=\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://www.ayrshare.com/docs/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://www.ayrshare.com/docs/es/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://www.ayrshare.com/docs/pt-BR/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://www.ayrshare.com/docs/fr/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://www.ayrshare.com/docs/de/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://www.ayrshare.com/docs/ja/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"uk\" href=\"https://www.ayrshare.com/docs/uk/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://www.ayrshare.com/docs/hi/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://www.ayrshare.com/docs/ar/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://www.ayrshare.com/docs/zh-Hans/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://www.ayrshare.com/docs/zh-Hant/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://www.ayrshare.com/docs/dashboard/connect-social-accounts/x-twitter-byo-keys\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.ayrshare.com/#organization\",\"name\":\"Ayrshare Docs\",\"url\":\"https://www.ayrshare.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=8d23367f493d06599eecbbfa2b6325cf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.ayrshare.com/docs#website\",\"name\":\"Ayrshare Docs\",\"url\":\"https://www.ayrshare.com/docs\",\"publisher\":{\"@id\":\"https://www.ayrshare.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys#webpage\",\"url\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\",\"name\":\"Thiết lập X API Key của riêng bạn\",\"description\":\"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\",\"dateModified\":\"2026-11-23T12:46:02.007Z\",\"isPartOf\":{\"@id\":\"https://www.ayrshare.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Dashboard\",\"item\":\"https://www.ayrshare.com/docs/vi/dashboard/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Connect Social Accounts\",\"item\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Thiết lập X API Key của riêng bạn\",\"item\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys#article\",\"headline\":\"Thiết lập X API Key của riêng bạn\",\"name\":\"Thiết lập X API Key của riêng bạn\",\"description\":\"Hướng dẫn từng bước để kết nối thông tin xác thực X (Twitter) API của bạn với Ayrshare\",\"url\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys\",\"mainEntityOfPage\":{\"@id\":\"https://www.ayrshare.com/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys#webpage\"},\"dateModified\":\"2026-11-23T12:46:02.007Z\",\"publisher\":{\"@id\":\"https://www.ayrshare.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.ayrshare.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ayrshare Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Ayrshare Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/vi/dashboard/connect-social-accounts/x-twitter-byo-keys.md","siteName":"Ayrshare Docs","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"es","pages":[{"title":"es","href":"/es/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"cn","hidden":true,"pages":[{"title":"cn","href":"/cn/dashboard/connect-social-accounts/x-twitter-byo-keys","hidden":true}]},{"language":"zh","hidden":true,"pages":[{"title":"zh","href":"/zh/dashboard/connect-social-accounts/x-twitter-byo-keys","hidden":true}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"de","pages":[{"title":"de","href":"/de/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"vi","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Get Started","pages":[{"title":"Ayrshare Social Media API","href":"/vi/introduction"},{"title":"Hướng dẫn Quick Start","href":"/vi/quickstart"},{"group":"MCP Server","pages":[{"title":"Ayrshare MCP Server: Điều khiển API bằng AI agent","sidebarTitle":"Tổng quan","icon":"robot","href":"/vi/additional/mcp-action-server"},{"title":"Kết nối tới MCP Server","sidebarTitle":"Kết nối \u0026 Thiết lập","icon":"plug","href":"/vi/additional/mcp-action-connect"},{"title":"Danh mục Công cụ MCP","sidebarTitle":"Danh mục Công cụ","icon":"list","href":"/vi/additional/mcp-action-tools"},{"title":"Plugin Claude Code","icon":"terminal","href":"/vi/additional/mcp-claude-code-plugin"},{"title":"n8n","icon":"diagram-project","href":"/vi/additional/mcp-n8n"},{"title":"Đưa các tài khoản mạng xã hội của khách hàng vào hệ thống","sidebarTitle":"Client Onboarding","icon":"user-plus","href":"/vi/additional/mcp-client-onboarding"},{"title":"Documentation MCP","sidebarTitle":"Documentation MCP","icon":"magnifying-glass","href":"/vi/additional/mcp-server"}]}]},{"group":"API Endpoints","pages":[{"title":"Tổng quan Ayrshare API","href":"/vi/apis/overview"},{"group":"GraphQL","pages":[{"title":"Tổng quan GraphQL API","href":"/vi/apis/graphql/overview"},{"title":"Sử dụng GraphQL API","href":"/vi/apis/graphql/using-the-api"},{"title":"Lỗi GraphQL","href":"/vi/apis/graphql/errors"},{"title":"Giới hạn và Tính phí GraphQL","href":"/vi/apis/graphql/limits"},{"title":"Quảng cáo","href":"/vi/apis/graphql/ads"}]},{"group":"Ads","pages":[{"title":"Ads API: Quảng bá bài đăng Meta và quản lý Google Ads","sidebarTitle":"Tổng quan về Ads API","href":"/vi/apis/ads/overview"},{"title":"Chiến dịch Quảng cáo","href":"/vi/apis/ads/campaigns"},{"group":"Facebook Ads","pages":[{"title":"Tài khoản","api":"GET /ads/facebook/accounts","href":"/vi/apis/ads/facebook/get-ad-accounts"},{"title":"Chiến dịch","api":"GET /ads/facebook/campaigns","href":"/vi/apis/ads/facebook/get-ad-campaigns"},{"title":"Boost Bài đăng","api":"POST /ads/facebook/boost","href":"/vi/apis/ads/facebook/boost-post"},{"title":"Quảng cáo đã Boost","api":"GET /ads/facebook/ads","href":"/vi/apis/ads/facebook/get-boosted-ads"},{"title":"Lịch sử","api":"GET /ads/facebook/history","href":"/vi/apis/ads/facebook/get-ad-history"},{"title":"Insights","api":"GET /ads/facebook/insights","href":"/vi/apis/ads/facebook/get-ad-insights"},{"title":"Sở thích","api":"GET /ads/facebook/interests","href":"/vi/apis/ads/facebook/get-ad-interests"},{"title":"Khu vực","api":"GET /ads/facebook/regions","href":"/vi/apis/ads/facebook/get-ad-regions"},{"title":"Thành phố","api":"GET /ads/facebook/cities","href":"/vi/apis/ads/facebook/get-ad-cities"},{"title":"Đề xuất DSA","api":"GET /ads/facebook/dsaRecommendations","href":"/vi/apis/ads/facebook/get-dsa-recommendations"},{"title":"Cập nhật Quảng cáo","api":"PUT /ads/facebook/ads","href":"/vi/apis/ads/facebook/put-ad-update"},{"title":"Đối tượng","api":"GET /ads/facebook/audiences","href":"/vi/apis/ads/facebook/get-audiences"},{"title":"Tạo đối tượng","api":"POST /ads/facebook/audiences","href":"/vi/apis/ads/facebook/create-audience"},{"title":"Xóa đối tượng","api":"DELETE /ads/facebook/audiences/{id}","href":"/vi/apis/ads/facebook/delete-audience"},{"title":"Thành viên đối tượng","api":"POST /ads/facebook/audiences/{id}/users","href":"/vi/apis/ads/facebook/audience-members"}]},{"group":"Instagram Ads","pages":[{"title":"Tài khoản","api":"GET /ads/instagram/accounts","href":"/vi/apis/ads/instagram/get-ad-accounts"},{"title":"Chiến dịch","api":"GET /ads/instagram/campaigns","href":"/vi/apis/ads/instagram/get-ad-campaigns"},{"title":"Khu vực","api":"GET /ads/instagram/regions","href":"/vi/apis/ads/instagram/get-ad-regions"},{"title":"Cities","api":"GET /ads/instagram/cities","href":"/vi/apis/ads/instagram/get-ad-cities"},{"title":"Đề xuất DSA","api":"GET /ads/instagram/dsaRecommendations","href":"/vi/apis/ads/instagram/get-dsa-recommendations"},{"title":"Boost Bài đăng","api":"POST /ads/instagram/boost","href":"/vi/apis/ads/instagram/boost-post"},{"title":"Quảng cáo đã Boost","api":"GET /ads/instagram/ads","href":"/vi/apis/ads/instagram/get-boosted-ads"},{"title":"Lịch sử","api":"GET /ads/instagram/history","href":"/vi/apis/ads/instagram/get-ad-history"},{"title":"Insights","api":"GET /ads/instagram/insights","href":"/vi/apis/ads/instagram/get-ad-insights"},{"title":"Sở thích","api":"GET /ads/instagram/interests","href":"/vi/apis/ads/instagram/get-ad-interests"},{"title":"Cập nhật Quảng cáo","api":"PUT /ads/instagram/ads","href":"/vi/apis/ads/instagram/put-ad-update"},{"title":"Đối tượng","api":"GET /ads/instagram/audiences","href":"/vi/apis/ads/instagram/get-audiences"},{"title":"Tạo đối tượng","api":"POST /ads/instagram/audiences","href":"/vi/apis/ads/instagram/create-audience"},{"title":"Xóa đối tượng","api":"DELETE /ads/instagram/audiences/{id}","href":"/vi/apis/ads/instagram/delete-audience"},{"title":"Thành viên đối tượng","api":"POST /ads/instagram/audiences/{id}/users","href":"/vi/apis/ads/instagram/audience-members"}]},{"group":"Google Ads","pages":[{"title":"Tài khoản","api":"GET /ads/google/accounts","href":"/vi/apis/ads/google/get-ad-accounts"},{"title":"Chiến dịch Google Search","sidebarTitle":"Chiến dịch Search","api":"POST /ads/google/campaigns","href":"/vi/apis/ads/google/search-campaigns"},{"title":"Chiến dịch Google Performance Max","sidebarTitle":"Chiến dịch Performance Max","api":"POST /ads/google/campaigns","href":"/vi/apis/ads/google/performance-max-campaigns"},{"title":"Lấy Chiến dịch","api":"GET /ads/google/campaigns/{id}","href":"/vi/apis/ads/google/get-campaign"},{"title":"Cập nhật Chiến dịch","api":"PUT /ads/google/campaigns/{id}","href":"/vi/apis/ads/google/update-campaign"},{"title":"Insights","api":"GET /ads/google/insights","href":"/vi/apis/ads/google/get-ad-insights"}]},{"group":"TikTok Ads","pages":[{"title":"Boost Bài đăng","api":"POST /ads/tiktok/boost","href":"/vi/apis/ads/tiktok/boost"}]},{"group":"Boost on Behalf","pages":[{"title":"Boost bài đăng của nhóm bạn","href":"/vi/apis/ads/delegations/boost-on-behalf"},{"title":"Tạo Ủy quyền Boost","api":"POST /ads/delegations","href":"/vi/apis/ads/delegations/create-delegations"},{"title":"Lấy Ủy quyền Boost","api":"GET /ads/delegations","href":"/vi/apis/ads/delegations/get-delegations"},{"title":"Thu hồi Ủy quyền Boost","api":"DELETE /ads/delegations/:id","href":"/vi/apis/ads/delegations/delete-delegation"}]}]},{"group":"Analytics","pages":[{"title":"Analytics API: Số liệu bài đăng, tài khoản và liên kết","sidebarTitle":"Tổng quan về Analytics API","href":"/vi/apis/analytics/overview"},{"title":"Phân tích một Bài đăng","api":"POST /analytics/post","href":"/vi/apis/analytics/post"},{"title":"Phân tích Bài đăng theo Social ID","api":"POST /analytics/post","href":"/vi/apis/analytics/social-by-id"},{"title":"Phân tích một Mạng xã hội","api":"POST /analytics/social","href":"/vi/apis/analytics/social"},{"title":"YouTube Playlists","api":"GET /analytics/youTubePlaylists","href":"/vi/apis/analytics/youtube-playlists"},{"title":"Số lượng Người theo dõi Instagram đang Trực tuyến","api":"GET /analytics/getInstagramOnlineFollowers","href":"/vi/apis/analytics/instagram-follower-count"}]},{"group":"Auto Schedule","pages":[{"title":"Tổng quan về Auto Schedule","href":"/vi/apis/auto-schedule/overview"},{"title":"Đặt Auto Schedule","api":"POST /auto-schedule/set","href":"/vi/apis/auto-schedule/set-schedule"},{"title":"Xóa Auto Schedule","api":"DELETE /auto-schedule/delete","href":"/vi/apis/auto-schedule/delete-schedule"},{"title":"Liệt kê Auto Schedule","api":"GET /auto-schedule/list","href":"/vi/apis/auto-schedule/list-schedule"},{"title":"Lấy Bài đăng Auto Schedule Đang Chờ","api":"GET /auto-schedule/pending","href":"/vi/apis/auto-schedule/pending-auto-schedule"}]},{"group":"Automations","tag":"BETA","pages":[{"title":"Tổng quan về Automations API","href":"/vi/apis/automations/overview"},{"title":"Tạo Automation","api":"POST /automations","href":"/vi/apis/automations/create-automation"},{"title":"Liệt kê Automation","api":"GET /automations","href":"/vi/apis/automations/list-automations"},{"title":"Lấy Automation","api":"GET /automations/:id","href":"/vi/apis/automations/get-automation"},{"title":"Cập nhật Automation","api":"PUT /automations/:id","href":"/vi/apis/automations/update-automation"},{"title":"Xóa Automation","api":"DELETE /automations/:id","href":"/vi/apis/automations/delete-automation"},{"title":"Lấy Activity của Automation","api":"GET /automations/:id/activity","href":"/vi/apis/automations/get-activity"}]},{"group":"Brand","pages":[{"title":"Brand API: Dữ liệu Tài khoản Công khai \u0026 Đối thủ Cạnh tranh","href":"/vi/apis/brand/overview"}]},{"group":"Comments","pages":[{"title":"Tổng quan về Comments API","href":"/vi/apis/comments/overview"},{"title":"Đăng một Bình luận","api":"POST /comments","href":"/vi/apis/comments/post-comment"},{"title":"Lấy Bình luận","api":"GET /comments/:id","href":"/vi/apis/comments/get-comments"},{"title":"Xóa Bình luận","api":"DELETE /comments/:id","href":"/vi/apis/comments/delete-comments"},{"title":"Trả lời một Bình luận","api":"POST /comments/reply/:commentId","href":"/vi/apis/comments/reply-to-comment"}]},{"group":"Feed","pages":[{"title":"Tổng quan về RSS Feeds","href":"/vi/apis/feeds/overview"},{"title":"Thêm RSS Feed","api":"POST /feed","href":"/vi/apis/feeds/add-feed"},{"title":"Xóa RSS Feed","api":"DELETE /feed","href":"/vi/apis/feeds/delete-feed"},{"title":"Lấy danh sách RSS Feeds","api":"GET /feed","href":"/vi/apis/feeds/get-feeds"},{"title":"Cập nhật RSS Feed","api":"PUT /feed","href":"/vi/apis/feeds/update-feed"}]},{"group":"Generate","pages":[{"title":"Tổng quan về Generate API","href":"/vi/apis/generate/overview"},{"title":"Tạo nội dung bài đăng","api":"POST /generate/post","href":"/vi/apis/generate/post-text"},{"title":"Viết lại bài đăng","api":"POST /generate/rewrite","href":"/vi/apis/generate/rewrite-post"},{"title":"Phiên âm video","api":"POST /generate/transcription","href":"/vi/apis/generate/transcribe-video"},{"title":"Dịch bài đăng","api":"POST /generate/translate","href":"/vi/apis/generate/translate-post"},{"title":"Tạo Alt Text","api":"POST /generate/altText","href":"/vi/apis/generate/image-alt-text"},{"title":"Phân tích cảm xúc","api":"POST /generate/sentiment","href":"/vi/apis/generate/sentiment"}]},{"group":"Hashtags","pages":[{"title":"Tổng quan về Hashtags API","href":"/vi/apis/hashtags/overview"},{"title":"Auto Hashtags","api":"POST /hashtags/auto","href":"/vi/apis/hashtags/auto-hashtags"},{"title":"Kiểm tra Hashtag bị cấm","api":"GET /hashtags/banned","href":"/vi/apis/hashtags/check-hashtags"},{"title":"Đề xuất Hashtag","api":"GET /hashtags/recommend","href":"/vi/apis/hashtags/recommend-hashtags"},{"title":"Tìm kiếm Hashtag","api":"GET /hashtags/search","href":"/vi/apis/hashtags/search-hashtags"}]},{"group":"History","pages":[{"title":"Tổng quan về History API","href":"/vi/apis/history/overview"},{"title":"Lịch sử bài đăng","api":"GET /history","href":"/vi/apis/history/get-history"},{"title":"Lịch sử bài đăng theo ID","api":"GET /history/:id","href":"/vi/apis/history/get-history-id"},{"title":"Lấy lịch sử bài đăng cho một nền tảng mạng xã hội","api":"GET /history/:platform","href":"/vi/apis/history/history-platform"},{"title":"Lịch sử bài đăng theo Social ID","api":"GET /history/:socialId","href":"/vi/apis/history/history-social-id"}]},{"group":"Links","pages":[{"title":"Tổng quan về Links API","href":"/vi/apis/links/overview"},{"title":"Tạo Short Link","api":"POST /links","href":"/vi/apis/links/create-short-link"},{"title":"Cập nhật Short Link","api":"PUT /links/:id","href":"/vi/apis/links/update-short-link"},{"title":"Phân tích liên kết","api":"GET /links/:id","href":"/vi/apis/links/link-analytics"}]},{"group":"Listening","pages":[{"title":"Listen API: Giám sát Mạng xã hội \u0026 Đề cập","href":"/vi/apis/listen/overview"},{"title":"Lấy Dữ liệu Thương hiệu","api":"GET /brand/byUser","href":"/vi/apis/listen/brand-user"},{"group":"Search","pages":[{"title":"Tìm kiếm Facebook Pages","api":"GET /brand/search/facebook","href":"/vi/apis/listen/search/fb-page-search"},{"title":"Tìm kiếm LinkedIn","api":"GET /brand/search/linkedin","href":"/vi/apis/listen/search/linkedin-search"}]},{"group":"Keyword","pages":[{"title":"Tìm kiếm Tweets theo Từ khóa","api":"GET /listen/keyword","href":"/vi/apis/listen/keyword/search-tweets"}]}]},{"group":"Media","pages":[{"title":"Tổng quan về Media API","href":"/vi/apis/media/overview"},{"title":"Tải lên Hình ảnh hoặc Video","api":"POST /media/upload","href":"/vi/apis/media/upload-media"},{"title":"Tải lên Tệp Media Lớn","api":"GET /media/uploadUrl","href":"/vi/apis/media/upload-large-media"},{"title":"Xác minh URL Media Tồn tại","api":"POST /media/urlExists","href":"/vi/apis/media/verify-media-url"},{"title":"Lấy Tất cả Media trong Gallery","api":"GET /media","href":"/vi/apis/media/get-media-in-gallery"},{"title":"Thay đổi kích thước Hình ảnh","api":"POST /media/resize","href":"/vi/apis/media/resize"},{"title":"Metadata của một tệp media","api":"GET /media/meta","href":"/vi/apis/media/get-media-metadata"},{"title":"Tìm kiếm audio Instagram","api":"GET /media/instagram/audio/search","href":"/vi/apis/media/search-instagram-audio"},{"title":"Lấy metadata audio Instagram","api":"GET /media/instagram/audio/{audioId}","href":"/vi/apis/media/get-instagram-audio"}]},{"group":"Messages","pages":[{"title":"Tổng quan về Messages API","href":"/vi/apis/messages/overview"},{"title":"Gửi Tin nhắn","api":"POST /messages/:platform","href":"/vi/apis/messages/send-message"},{"title":"Lấy Tin nhắn","api":"GET /messages/:platform","href":"/vi/apis/messages/get-messages"},{"title":"Cập nhật Tin nhắn","api":"PUT /messages/:platform/:conversationId","href":"/vi/apis/messages/update-messages"},{"title":"Đặt Phản hồi Tự động","api":"POST /messages/autoresponse","href":"/vi/apis/messages/set-auto-response"},{"title":"Lấy Phản hồi Tự động","api":"GET /messages/autoresponse","href":"/vi/apis/messages/get-auto-response"}]},{"group":"Post","pages":[{"title":"Tổng quan Post API","href":"/vi/apis/post/overview"},{"title":"Publish a Post API: Đăng bài lên bất kỳ mạng xã hội nào","api":"POST /post","href":"/vi/apis/post/post"},{"title":"Get a Post","api":"GET /post/:id","href":"/vi/apis/post/get-post"},{"title":"Delete a Post","api":"DELETE /post","href":"/vi/apis/post/delete-post"},{"title":"Update a Post","api":"PATCH /post","href":"/vi/apis/post/update-post"},{"title":"Retry a Post","api":"PUT /post/retry","href":"/vi/apis/post/retry-post"},{"title":"Copy a Post","api":"POST /post/copy","href":"/vi/apis/post/copy-post"},{"title":"Bulk Post","api":"POST /post/bulk","href":"/vi/apis/post/bulk-post"},{"group":"Social Networks","pages":[{"title":"Các mạng xã hội được hỗ trợ","href":"/vi/apis/post/social-networks/overview"},{"title":"Bluesky API","icon":"bluesky","href":"/vi/apis/post/social-networks/bluesky"},{"title":"Facebook Page API","icon":"facebook","href":"/vi/apis/post/social-networks/facebook"},{"title":"Google Business Profile API","icon":"google","href":"/vi/apis/post/social-networks/google"},{"title":"Instagram API","icon":"instagram","href":"/vi/apis/post/social-networks/instagram"},{"title":"LinkedIn API","icon":"linkedin","href":"/vi/apis/post/social-networks/linkedin"},{"title":"Pinterest API","icon":"pinterest","href":"/vi/apis/post/social-networks/pinterest"},{"title":"Reddit API","icon":"reddit","href":"/vi/apis/post/social-networks/reddit"},{"title":"Snapchat API","icon":"snapchat","href":"/vi/apis/post/social-networks/snapchat"},{"title":"Telegram API","icon":"telegram","href":"/vi/apis/post/social-networks/telegram"},{"title":"Threads API","icon":"threads","href":"/vi/apis/post/social-networks/threads"},{"title":"TikTok API","icon":"tiktok","href":"/vi/apis/post/social-networks/tiktok"},{"title":"X API","icon":"x-twitter","href":"/vi/apis/post/social-networks/x-twitter"},{"title":"YouTube API","icon":"youtube","href":"/vi/apis/post/social-networks/youtube"}]}]},{"group":"Profiles","pages":[{"title":"Tổng quan API Profiles","href":"/vi/apis/profiles/overview"},{"title":"Tạo User Profile","api":"POST /profiles","href":"/vi/apis/profiles/create-profile"},{"title":"Xóa User Profile","api":"DELETE /profiles","href":"/vi/apis/profiles/delete-profile"},{"title":"Cập nhật User Profile","api":"PATCH /profiles","href":"/vi/apis/profiles/update-profile"},{"title":"Lấy danh sách User Profile","api":"GET /profiles","href":"/vi/apis/profiles/get-profiles"},{"title":"Hủy liên kết mạng xã hội","api":"DELETE /profiles/social","href":"/vi/apis/profiles/unlink-social-network"},{"title":"Tổng quan Liên kết Mạng xã hội","href":"/vi/apis/profiles/social-linking-overview"},{"title":"Tạo một Link Session","api":"POST /profiles/link-sessions","href":"/vi/apis/profiles/create-link-session"},{"title":"Lấy một Link Session","api":"GET /profiles/link-sessions/{sessionId}","href":"/vi/apis/profiles/get-link-session"},{"title":"Thu hồi một Link Session","api":"DELETE /profiles/link-sessions/{sessionId}","href":"/vi/apis/profiles/revoke-link-session"},{"title":"Tạo URL liên kết (generateJWT)","api":"POST /profiles/generateJWT","deprecated":true,"href":"/vi/apis/profiles/generate-jwt"}]},{"group":"Reviews","pages":[{"title":"Tổng quan API Reviews","href":"/vi/apis/reviews/overview"},{"title":"Lấy tất cả đánh giá","api":"GET /reviews","href":"/vi/apis/reviews/get-reviews"},{"title":"Lấy một đánh giá","api":"GET /reviews/:id","href":"/vi/apis/reviews/get-one-review"},{"title":"Trả lời đánh giá","api":"POST /reviews","href":"/vi/apis/reviews/reply-review"},{"title":"Xóa phản hồi đánh giá","api":"DELETE /reviews","href":"/vi/apis/reviews/delete-review-reply"}]},{"group":"User","pages":[{"title":"Tổng quan API User Profile","href":"/vi/apis/user/overview"},{"title":"Chi tiết User Profile","api":"GET /user","href":"/vi/apis/user/profile-details"},{"title":"Pinterest Boards","api":"GET /user/details/pinterest","href":"/vi/apis/user/pinterest-board"},{"title":"Cập nhật người dùng","api":"PATCH /user/:platform","href":"/vi/apis/user/update-user"},{"title":"Hồ sơ doanh nghiệp WhatsApp","api":"GET /user/details/whatsapp","href":"/vi/apis/user/whatsapp-profile"},{"title":"Lấy hàng loạt tất cả","api":"GET /user/batch","href":"/vi/apis/user/batch-all-users"}]},{"group":"Utils","pages":[{"title":"Trạng thái yêu cầu cộng tác","api":"GET /post/collaborators/:id","href":"/vi/apis/utils/instagram-get-collaborator"},{"title":"Reddit Flair","api":"GET /post/redditFlair/:subreddit","href":"/vi/apis/utils/reddit-get-flair"},{"title":"Tra cứu người dùng","api":"GET /user/lookups","href":"/vi/apis/utils/user-lookups"},{"group":"YouTube","pages":[{"title":"Danh mục YouTube","api":"GET /post/youtubeCategories/:region","href":"/vi/apis/utils/youtube-categories"},{"title":"Đặt YouTube Watermark","api":"POST /post/youTubeWatermark","href":"/vi/apis/utils/set-youtube-watermark"},{"title":"Xóa YouTube Watermark","api":"DELETE /post/youTubeWatermark","href":"/vi/apis/utils/remove-youtube-watermark"}]}]},{"group":"Validate","pages":[{"title":"Tổng quan API Validate","href":"/vi/apis/validate/overview"},{"title":"Xác thực phương tiện","href":"/vi/apis/validate/validate-media"},{"title":"Kiểm tra độ dài bài đăng","api":"POST /validate/postLength","href":"/vi/apis/validate/check-post-length"},{"title":"Kiểm tra subreddit tồn tại","api":"GET /validate/redditExists/:subreddit","href":"/vi/apis/validate/check-subreddit"},{"title":"Kiểm duyệt nội dung","api":"POST /validate/moderation","href":"/vi/apis/validate/moderation"},{"title":"Xác thực JSON","api":"POST /validate/json","href":"/vi/apis/validate/validate-json"},{"title":"Xác thực bài đăng","api":"POST /validate/post","href":"/vi/apis/validate/validate-post"}]},{"group":"Webhooks","pages":[{"title":"Tổng quan Webhooks","href":"/vi/apis/webhooks/overview"},{"title":"Webhook Actions","href":"/vi/apis/webhooks/actions"},{"title":"Đăng ký Webhook","api":"POST /hook/webhook","href":"/vi/apis/webhooks/register"},{"title":"Hủy đăng ký Webhook","api":"DELETE /hook/webhook","href":"/vi/apis/webhooks/unregister"},{"title":"Xoay Signing Secret","api":"POST /hook/webhook/secret","href":"/vi/apis/webhooks/rotate-signing-secret"},{"title":"Liệt kê Webhook đã đăng ký","api":"GET /hook/webhook","href":"/vi/apis/webhooks/list"},{"title":"Lịch sử Webhook","api":"GET /hook/history","href":"/vi/apis/webhooks/history"}]}]},{"group":"Multiple Users","pages":[{"title":"Launch Plan: gói Business đa người dùng cấp nhập môn","href":"/vi/multiple-users/business-launch-overview"},{"title":"Tổng quan Gói Business","href":"/vi/multiple-users/business-plan-overview"},{"title":"Tích hợp Người dùng","href":"/vi/multiple-users/user-integration"},{"title":"Tích hợp API cho Doanh nghiệp","href":"/vi/multiple-users/api-integration-business"},{"title":"Widget Ayrshare Connect","href":"/vi/multiple-users/connect-widget"},{"title":"Tự Xây dựng Cửa sổ Bật lên Liên kết","href":"/vi/multiple-users/connect-direct-mode"},{"title":"Sự kiện Hoàn tất Liên kết","href":"/vi/multiple-users/link-completion-events"},{"title":"Quản lý nhiều Profile Người dùng","href":"/vi/multiple-users/manage-user-profiles"}]},{"group":"Dashboard","pages":[{"title":"Tổng quan Ayrshare Dashboard: Quản lý đăng bài mạng xã hội","href":"/vi/dashboard/overview"},{"group":"Connect Social Accounts","pages":[{"title":"Kết nối tài khoản mạng xã hội của bạn","href":"/vi/dashboard/connect-social-accounts/overview"},{"title":"Liên kết Bluesky","icon":"bluesky","href":"/vi/dashboard/connect-social-accounts/bluesky"},{"title":"Liên kết Facebook","icon":"facebook","href":"/vi/dashboard/connect-social-accounts/facebook"},{"title":"Liên kết Google Business Profile","icon":"google","href":"/vi/dashboard/connect-social-accounts/google-business"},{"title":"Liên kết Instagram","icon":"instagram","href":"/vi/dashboard/connect-social-accounts/instagram"},{"title":"Liên kết LinkedIn","icon":"linkedin","href":"/vi/dashboard/connect-social-accounts/linkedin"},{"title":"Liên kết Pinterest","icon":"pinterest","href":"/vi/dashboard/connect-social-accounts/pinterest"},{"title":"Liên kết Reddit","icon":"reddit","href":"/vi/dashboard/connect-social-accounts/reddit"},{"title":"Liên kết Snapchat","icon":"snapchat","href":"/vi/dashboard/connect-social-accounts/snapchat"},{"title":"Liên kết nhóm hoặc kênh Telegram với Ayrshare","icon":"telegram","href":"/vi/dashboard/connect-social-accounts/telegram"},{"title":"Liên kết Threads","icon":"threads","href":"/vi/dashboard/connect-social-accounts/threads"},{"title":"Liên kết TikTok","description":"Liên kết tài khoản TikTok cá nhân hoặc doanh nghiệp với Ayrshare bằng cách cấp quyền trên TikTok, kèm lưu ý về hạn liên kết 365 ngày và cách khắc phục sự cố.","icon":"tiktok","href":"/vi/dashboard/connect-social-accounts/tiktok"},{"title":"Thiết lập X API Key của riêng bạn","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys"},{"title":"Liên kết X","description":"Liên kết tài khoản X (Twitter) với Ayrshare bằng cách nhập X Consumer Key và Consumer Secret, đăng nhập qua cửa sổ pop-up và cấp quyền cho ứng dụng.","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter"},{"title":"Liên kết YouTube","icon":"youtube","href":"/vi/dashboard/connect-social-accounts/youtube"}]},{"title":"Cách đăng bài mạng xã hội","href":"/vi/dashboard/publish-post"},{"title":"Xem JSON","href":"/vi/dashboard/view-json"},{"title":"Thu hồi quyền truy cập mạng xã hội","href":"/vi/dashboard/revoke-access"},{"group":"RSS","pages":[{"title":"Nguồn cấp RSS, Substack và YouTube","href":"/vi/dashboard/automated-rss-feeds"},{"title":"Tìm URL nguồn cấp RSS","href":"/vi/dashboard/find-rss"}]}]},{"group":"Additional","pages":[{"group":"What's New At Ayrshare","pages":[{"title":"Cập nhật Mới nhất","href":"/vi/whatsnew/latest"},{"title":"Kho lưu trữ Cập nhật","href":"/vi/whatsnew/archive"},{"title":"Các thay đổi API sắp tới","mode":"wide","href":"/vi/whatsnew/upcoming-api-changes"}]},{"group":"Errors","pages":[{"title":"Tổng quan về lỗi","href":"/vi/errors/overview"},{"title":"Mã trạng thái HTTP","href":"/vi/errors/errors-http"},{"title":"Mã lỗi Ayrshare","href":"/vi/errors/errors-ayrshare"}]},{"title":"Max Pack","mode":"wide","href":"/vi/additional/maxpack"},{"group":"Media Guidelines","pages":[{"title":"Yêu cầu Hình ảnh \u0026 Video Mạng xã hội","href":"/vi/media-guidelines/overview"},{"title":"Bluesky","icon":"bluesky","href":"/vi/media-guidelines/bluesky"},{"title":"Trang Facebook","icon":"facebook","href":"/vi/media-guidelines/facebook-pages"},{"title":"Google Business Profile","icon":"google","href":"/vi/media-guidelines/google-business-profile"},{"title":"Instagram","icon":"instagram","href":"/vi/media-guidelines/instagram"},{"title":"LinkedIn","icon":"linkedin","href":"/vi/media-guidelines/linkedin"},{"title":"Pinterest","icon":"pinterest","href":"/vi/media-guidelines/pinterest"},{"title":"Reddit","icon":"reddit","href":"/vi/media-guidelines/reddit"},{"title":"Snapchat","icon":"snapchat","href":"/vi/media-guidelines/snapchat"},{"title":"Telegram","icon":"telegram","href":"/vi/media-guidelines/telegram"},{"title":"Threads","icon":"threads","href":"/vi/media-guidelines/threads"},{"title":"TikTok","icon":"tiktok","href":"/vi/media-guidelines/tiktok"},{"title":"WhatsApp","icon":"whatsapp","href":"/vi/media-guidelines/whatsapp"},{"title":"X","icon":"x-twitter","href":"/vi/media-guidelines/x-twitter"},{"title":"YouTube","icon":"youtube","href":"/vi/media-guidelines/youtube"}]},{"group":"Packages \u0026 Guides","pages":[{"title":"Tổng quan SDK \u0026 Hướng dẫn Tích hợp Ayrshare","mode":"wide","href":"/vi/packages-guides/overview"},{"title":"Airtable","href":"/vi/packages-guides/airtable"},{"title":"Bubble.io","href":"/vi/packages-guides/bubble"},{"title":"Flutter","href":"/vi/packages-guides/flutter"},{"title":"FlutterFlow","href":"/vi/packages-guides/flutterflow"},{"title":"Make","href":"/vi/packages-guides/make"},{"title":"n8n","href":"/vi/packages-guides/n8n"},{"title":"Node.js NPM","href":"/vi/packages-guides/nodejs"},{"title":"Notion","href":"/vi/packages-guides/notion"},{"title":"Python PyPI","href":"/vi/packages-guides/python"},{"title":"Retool","href":"/vi/packages-guides/retool"}]},{"title":"Trạng thái hệ thống","href":"/vi/additional/status"},{"group":"Testing \u0026 Verification","pages":[{"title":"Hurl","href":"/vi/testing/hurl"},{"title":"Điểm cuối Xác thực","href":"/vi/testing/validation-endpoints"},{"title":"Postman","href":"/vi/testing/postman"},{"title":"Xác minh Bài đăng","href":"/vi/testing/post-verification"},{"title":"Kiểm tra trước khi đăng","href":"/vi/testing/pre-publish-checks"}]},{"group":"ISO Codes","pages":[{"title":"Mã quốc gia","href":"/vi/iso-codes/country"},{"title":"Mã ngôn ngữ","href":"/vi/iso-codes/language"}]}]}]},{"anchor":"Help Center","icon":"lightbulb","pages":[{"title":"Help Center","href":"/vi/help-center/overview"}]}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"uk","pages":[{"title":"uk","href":"/uk/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"hi","pages":[{"title":"hi","href":"/hi/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"ar","pages":[{"title":"ar","href":"/ar/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/dashboard/connect-social-accounts/x-twitter-byo-keys"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/dashboard/connect-social-accounts/x-twitter-byo-keys"}]}]},"basePath":"","title":"Thiết lập X API Key của riêng bạn - Ayrshare Docs","deploymentId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","buildId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-rqAEl6iQ.js","lightbox-handle-r17bVUz3.js"]}