GetToken {{

POST /v1/auth/token

GetToken

{{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". It is used to generate a short lived access token for web access.

{{import "tables.md"}}

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
  • default application/json

    Default error response

    Hide response attributes Show response attributes object
    • code integer(int32)

      The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

    • message string

      A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

    • details array[object]

      A list of messages that carry the error details. There is a common set of message types for APIs to use.

      Hide details attributes Show details attributes object
POST /v1/auth/token
curl \
 --request POST https://api.brease.run/v1/auth/token \
 --header "X-API-KEY: $API_KEY"
Response examples (200)
{
  "accessToken": "string",
  "refreshToken": "string"
}
Response examples (default)
{
  "code": 42,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}