Skip to content

upstream: GET /api/user_info now returns trial_end_timestamp #65

@mexcool

Description

@mexcool

What changed upstream

The SimpleLogin upstream added a new field trial_end_timestamp to the GET /api/user_info response.

File changed: app/api/views/user_info.py

Diff:

@@ -31,6 +31,7 @@ def user_to_dict(user: User) -> dict:
      "is_premium": user.is_premium(),
      "email": user.email,
      "in_trial": user.in_trial(),
+     "trial_end_timestamp": user.trial_end.timestamp if user.trial_end else None,
      "max_alias_free_plan": user.max_alias_for_free_account(),

The field is a Unix timestamp (integer) when the trial ends, or null if no trial is active.

Updated API docs example response:

{
  "is_premium": false,
  "email": "john@wick.com",
  "in_trial": true,
  "trial_end_timestamp": 1234567890,
  "profile_picture_url": "https://profile.png",
  "max_alias_free_plan": 5
}

What needs to change in the CLI

  1. internal/api/client.go — Add TrialEndTimestamp *int64 to the UserInfo struct (line ~176):
type UserInfo struct {
    Name              string  `json:"name"`
    Email             string  `json:"email"`
    IsPremium         bool    `json:"is_premium"`
    InTrial           bool    `json:"in_trial"`
    TrialEndTimestamp *int64  `json:"trial_end_timestamp"`  // NEW
    ProfilePicURL     string  `json:"profile_picture_url"`
    MaxAliasFreePlan  int     `json:"max_alias_free_plan"`
}
  1. cmd/auth/whoami.go (or whichever command renders user info) — Display the trial end date in human-readable format when in_trial is true and trial_end_timestamp is non-nil.

Detected by upstream watchercompare simple-login/app

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-fixReady for Claude auto-fixupstream-changeChange detected in upstream SimpleLogin app

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions