Medusa 商城 API
    latest
    • latest
    • v2.0.0
    • v3.0.0
    • Back to home
    • 身份验证
    • 客户登录 (JWT)
      POST
    • 客户登录 (JWT)
      POST
    • 检查电子邮件是否存在
      GET
    • 获取当前客户
      GET
    • 客户登出
      DELETE
    • 客户登录
      POST

      客户登录 (JWT)

      POST
      /store/auth/token
      成功登录后,将返回一个JWT令牌,该令牌可用于发送经过身份验证的请求。

      Request

      Authorization
      Bearer Token
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      or
      Header Params

      Body Params application/json

      Example
      {
          "email": "string",
          "password": "string"
      }

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://apifoxmock.com/m1/4532246-4179931-default/store/auth/token' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
          "email": "string",
          "password": "string"
      }'

      Responses

      🟢200正常
      application/json
      Bodyapplication/json

      Example
      {
          "access_token": "string"
      }
      🟠400客户端错误或多个错误
      🟠401用户不存在或凭据不正确
      🟠404未找到错误
      🟠409无效状态错误
      🟠422无效请求错误
      🔴500服务器错误
      Modified at 2024-12-13 03:41:57
      Previous
      客户登录 (JWT)
      Next
      检查电子邮件是否存在
      Built with