SuperAPI AI Directory

mo-auth

Coding & development

View repository

Updated 10-16 06:49

About this skill

Prerequisites

CRITICAL — Read first 共享规则, which contains mocli initialization, authentication, output parsing, and security rules

mocli auth - Mowen Auth authentication

This skill provides the Mowen Auth authentication capability, guiding you on how to use mocli auth to complete the configuration and update of the API Key, retrieve the current configuration information, and retrieve the account corresponding to the API Key, i.e. the Profile information on the Mowen platform.

Usage Principles

  • When the user provides a new API Key or requests authentication initialization, use mocli auth init --apik <api-key>。
  • When the user explicitly requests to change, overwrite, or reconfigure the API Key, use mocli auth init --apik <api-key> --force。
  • When the user wants to view the current authentication status, use mocli auth info; when the user also wants to view the account profile, use mocli auth info --profile。
  • All response displays must hide the API Key. Even if mocli returns a masked value, do not additionally repeat the full key.
  • When other commands return reason=AUTH , guide the user to provide the API Key again, and use init --force to update.

mocli auth init --apik [--force]

Initialize the API Key. Optional parameter --force is used to change (overwrite) an existing API Key. This command writes to the local authentication configuration; before executing, confirm that the user really wants to initialize or overwrite.

Usage Examples

  • My Mowen apikey is , help me complete authentication/initialization mocli auth init --apik xxxxxx
  • My Mowen apikey has changed, help me update it mocli auth init --apik xxxxxx --force

mocli auth info [--profile]

Retrieve the current authentication configuration. Optional parameter --profile is used to additionally retrieve the Profile (user information) of the account corresponding to the current API Key on the Mowen platform.

Usage Examples

  • View my Mowen authentication information mocli auth info
  • View my Mowen authentication information and return my user profile mocli auth info --profile

Output Examples

{
  "code": 0,
  "status": "OK",
  "reply": {
    "auth": {
      "api_key": "hx3jrU31xxs**********0BVvUm4ytQK",
      "mo_uid": "KBqt7yiVrXBa9DJIJuUm3"
    },
    "profile": {
      "uid": "KBqt7yiVrXBa9DJIJuUm3",
      "name": "精卫鸟zzz🇨🇳",
      "intro": "in culpa nostrud",
      "regist_at": 1662465648,
      "member": {
        "is_member": true,
        "plans": {
          "pro": {
            "type": "pro",
            "status": 64,
            "expire_at": 1852446600011
          }
        }
      }
    }
  }
}

reply field description

Field Type Description Reference Field
auth object Authentication information AuthInfo - 认证信息
profile object The user's Profile (user information) on the Mowen platform UserInfo - 用户信息

Display Notes

  • auth.api_key is sensitive information. When displaying the authentication status, only state "configured" or show a masked segment; do not output the full key.
  • auth.mo_uid can be displayed, to help the user confirm the current authenticated account.
  • If profile exists, profile.name、profile.uid、profile.intro, membership status, and other non-sensitive information can be displayed.
  • If the command fails and reason=AUTH, do not continue calling commands that require authentication; first prompt the user to reinitialize the API Key.
Display Rules

** Reference ** 公共展示规则