Morpheus API Gateway LogoMorpheus API Gateway
Auth

Get Private Key Status

Check if a user has a private key registered. Does not return the actual key, only status information.

GET
/api/v1/auth/private-key

Authorization

AuthorizationRequiredBearer <token>

Enter the JWT token you received from the login endpoint (without 'Bearer' prefix)

In: header

Response Body

Schema for private key status response

TypeScript Definitions

Use the response body type in TypeScript.

has_keyRequiredHas Key
created_atstring | null | null
updated_atstring | null | null

Validation Error

TypeScript Definitions

Use the response body type in TypeScript.

detailDetail
curl -X GET "https://api.mor.org/api/v1/auth/private-key" \
  -H "Authorization: Bearer <token>"
fetch("https://api.mor.org/api/v1/auth/private-key", {
  headers: {
    "Authorization": "Bearer <token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.mor.org/api/v1/auth/private-key"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.mor.org/api/v1/auth/private-key"

response = requests.request("GET", url, headers = {
  "Authorization": "Bearer <token>"
})

print(response.text)
{
  "has_key": true,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

How is this guide?