summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-16 23:50:00 +0300
committerPaul Buetow <paul@buetow.org>2025-09-16 23:50:00 +0300
commit650bfe958f84cbb3045c33044b46562c51720e0a (patch)
tree469721d25f6d362c15f3aa153e0da7e966417272 /README.md
parent2c076a24fd94a64b4da8b3e7682a27c99d24cc0d (diff)
make linkedin version API configurable
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/README.md b/README.md
index ef9051a..82dbe16 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,8 @@ Example Configuration File (`~/.config/gos/gos.json`):
"MastodonAccessToken": "your-mastodon-access-token",
"LinkedInClientID": "your-linkedin-client-id",
"LinkedInSecret": "your-linkedin-client-secret",
- "LinkedInRedirectURL": "http://localhost:8080/callback"
+ "LinkedInRedirectURL": "http://localhost:8080/callback",
+ "LinkedInVersion": ""
}
```
@@ -86,11 +87,20 @@ Example with pause period configured:
* `LinkedInClientID`: The client ID for your LinkedIn app, which is needed for OAuth2 authentication.
* `LinkedInSecret`: The client secret for your LinkedIn app.
* `LinkedInRedirectURL`: The redirect URL configured for handling OAuth2 responses.
+* `LinkedInVersion`: (Optional) LinkedIn API version header value (e.g., `202502`). Set this if you receive 426 Upgrade Required with `NONEXISTENT_VERSION`. Leave empty to omit the header and use LinkedIn's default.
* `LinkedInAccessToken`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
* `LinkedInPersonID`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
* `PauseStart`: (Optional) Start date for pausing all posts in YYYY-MM-DD format.
* `PauseEnd`: (Optional) End date for pausing all posts in YYYY-MM-DD format.
+### LinkedIn API versioning
+
+LinkedIn requires an active API version via the `LinkedIn-Version` header for some endpoints. If you see an error like:
+
+`Status: 426 Upgrade Required {"code":"NONEXISTENT_VERSION","message":"Requested version <date> is not active"}`
+
+set an active version string (e.g., `202502`) in the `LinkedInVersion` field of your config. You can also clear the field to omit the header and fall back to LinkedIn's default version.
+
### Automatically managed fields
Once you finish the OAuth2 setup (after the initial run of `gos`), some fields—like `LinkedInAccessToken` and `LinkedInPersonID` will get filled in automatically. To check if everything's working without actually posting anything, you can run the app in dry run mode with the `--dry` option. After OAuth2 is successful, the file will be updated with `LinkedInClientID` and `LinkedInAccessToken`. If the access token expires, it will go through the OAuth2 process again.