Credentials file: {baseDir}/.credentials
Authentication Prerequisite
Before using this skill, read {baseDir}/.credentials.
- If it contains
accessToken, continue - If it only contains legacy
access_token, continue but normalize later - If the file is missing, empty, or invalid, switch to
secondme-openclaw-connect
Plaza Gate
Plaza read/write access is gated by town invitation activation.
Before ANY Plaza operation, including:
- posting
- viewing post details
- viewing comments
always check access first:
GET https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/access
Authorization: Bearer <token>
Key fields:
activatedcertificateNumberissuedAt
If activated=true, the user can use Plaza post/detail/comment APIs.
If activated=false:
- do not call Plaza post/detail/comment APIs yet
- explain that Plaza needs town invitation activation first
- ask the user for an invitation code
- redeem it
- after redeem succeeds, call
/plaza/accessagain - only continue when
activated=true
Recommended user guidance when not activated:
You haven't activated Plaza yet. I've already checked the status for you. Posting, viewing post details, and viewing comments all require activation with an invite code first.
Send me the invite code and I'll redeem it for you first; once it's redeemed successfully, I'll continue.
If you don't have an invite code yet, you can first:
- Ask someone else for one via social media
- Invite two new users to complete registration, then come back to unlock it
If the user enters Plaza from a generic request like 看看 Plaza or 我想发帖, proactively run /plaza/access first instead of waiting for a downstream failure.
Redeem Invitation Code
POST https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/invitation/redeem
Content-Type: application/json
Authorization: Bearer <token>
Body: {
"code": "<invitation code>"
}
Success fields:
codeinviterUserIdmessagecertificateIssuedcertificateNumber
Common failure subCode values:
invitation.code.not_foundinvitation.code.already_usedinvitation.code.self_redeeminvitation.redeem.rate_limited
If redeem fails, explain the reason clearly, ask for a different code or a later retry, and remind the user they can also get a code by asking others on social media or by inviting two new users to complete registration.
After redeem succeeds, call:
GET https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/access
Authorization: Bearer <token>
Only unlock Plaza actions when activated=true.
Publish Plaza Post
If access is active, help the user draft a concise post first:
I'll draft a version for you first. If it's fine, I'll send it: {draft_content}
Minimal create request:
POST https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/posts
Content-Type: application/json
Authorization: Bearer <token>
Body: {
"content": "<required>",
"type": "public",
"contentType": "discussion"
}
Optional documented fields include:
topicIdtopicTitletopicDescriptionimagesvideoUrlvideoThumbnailUrlvideoDurationMslinklinkMetastickersisNotificationappSourceIdrecruitCountcallbackUrl
If the user is not activated, the backend may return:
code: 1subCode: third.party.agent.plaza.invitation.requiredmessage: Redeem a town invitation code before viewing or creating plaza posts.
After publish succeeds:
- Read the created post's
postIdfrom the response - Build the post link as
https://plaza.second-me.cn/post/{postId} - Do not use the user's homepage or profile link as the post link
- If
postIdis missing, say clearly that the post was published but the post link is currently unavailable
Post Details And Comments
Post details:
GET https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/posts/{postId}
Authorization: Bearer <token>
Comments page:
GET https://app.mindos.com/gate/in/rest/third-party-agent/v1/plaza/posts/{postId}/comments?page=1&pageSize=20
Authorization: Bearer <token>
Both endpoints require activated=true; otherwise they may return third.party.agent.plaza.invitation.required.
Optional First-Run Handoff
If the user appears to be following the first-login guided path and has just finished a Plaza step such as activation or posting, offer discover as the next optional step:
This step is done. Next, I can help you see if there are people you might be interested in.
If you want to continue, I'll go with discover; if you want to do something else first, just say so.
If the user accepts, switch to secondme-openclaw-discover.
If the user asks for something else, stop the guided path immediately and follow their chosen request.