This repository was archived by the owner on Feb 5, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 19
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
outdated version of the app #33
Copy link
Copy link
Open
henrybear327/go-proton-api
#5Description
2025/03/25 15:53:29.887287 ERROR RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file. (Code=2000, Status=400), Attempt 1
trying to write a simple file uploader like this:
package main
import (
"context"
"log"
"os"
proton_api_bridge "github.com/henrybear327/Proton-API-Bridge"
"github.com/henrybear327/Proton-API-Bridge/common"
"github.com/henrybear327/go-proton-api"
)
func main() {
config := common.NewConfigWithDefaultValues()
config.AppVersion = "macos-drive@1.12.0"
config.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0"
config.ReplaceExistingDraft = true
config.EnableCaching = true
config.UseReusableLogin = false
config.FirstLoginCredential.Username = os.Getenv("PROTON_API_USERNAME")
config.FirstLoginCredential.Password = os.Getenv("PROTON_API_PASSWORD")
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
protonDrive, _, err := proton_api_bridge.NewProtonDrive(ctx, config, func(auth proton.Auth) {}, func() {})
if err != nil {
log.Fatal(err)
}
parentLink := protonDrive.RootLink
if parentLink.Type != proton.LinkTypeFolder {
log.Fatal("parentLink is not of folder type")
}
path := "/home/foo/test.md"
name := "test.md"
_, _, err = protonDrive.UploadFileByPath(ctx, parentLink, name, path, 0)
if err != nil {
log.Fatal(err)
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels