---
post:

  summary: Get temporary login_token for a user

  tags:
    - User

  description: |
    Generate a temporary `login_token` which can be used with `getpersonaltoken`
    to get valid OAuth credentials for that user. The endpoint also returns a
    base64-encoded PNG image of a QR code. This QR code also contains the
    `login_token` embedded in a simple JSON structure. The only purpose of the
    JSON is to allow the potential for versioning in future.

    This feature is generally for use with Scrive mobile applications and will
    be supported in an upcoming relase.

  parameters:
    - name: minutes
      in: formData
      type: integer
      required: false
      default: 5
      maximum: 30
      description: |
        How many minutes the `login_token` should be valid for (maximum of 30).

  responses:
    200:
      $ref: ../../scrive_api.yaml#/definitions/LoginToken
