Skip to content

vermilion10/akef-checkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AKEF-Checkin (Arknights Endfield Auto Check-in)

Automated daily check-in script for Arknights Endfield (SKport). Built with TypeScript and Bun, runs via GitHub Actions automatically every day.

Features

  • Serverless: Runs automatically every day using GitHub Actions.
  • Self-refreshing Tokens: Uses a single long-lived ACCOUNT_TOKEN to generate fresh credentials on every run. No more manual token updates.
  • Multi-Account Support: Supports checking in multiple accounts at once.
  • Discord Notifications: Sends a daily result summary to your Discord server via Webhook.
  • Reward Info: Reports the items and quantities received from each check-in.

Setup (GitHub Actions — Recommended)

Step 1: Get Your ACCOUNT_TOKEN

Important

The ACCOUNT_TOKEN is not visible in the Application → Cookies tab. It lives on the Hypergryph auth server (as.gryphline.com) and must be found via the Network tab.

  1. Open https://game.skport.com/endfield/sign-in in your browser while already logged in.
  2. Press F12 to open DevTools and go to the Network tab.
  3. Reload the page (F5) to capture network requests.
  4. In the filter box at the top, type: grant
  5. Click on the request to https://as.gryphline.com/user/oauth2/v2/grant
  6. Click the Payload tab (not "Response" — Payload contains what was sent to the server).
  7. You will see a JSON body like:
    {
      "token": "YOUR_ACCOUNT_TOKEN_IS_HERE",
      "appCode": "6eb76d4e13aa36e6",
      "type": 0
    }
  8. Copy the value of "token" — that is your ACCOUNT_TOKEN.

This token is long-lived (weeks to months). The script automatically generates all other credentials (cred, signToken, gameRole) on every run, so you will rarely need to update it.


Step 2: Push to GitHub

  1. Create a new repository (Public or Private) on GitHub.
  2. Push the contents of this folder to that repository.

Step 3: Add GitHub Secrets

  1. In your repository, go to Settings → Secrets and variables → Actions.

  2. Click New repository secret and add the following:

    Name Value
    SKPORT_TOKENS JSON array with your token (see format below)
    DISCORD_WEBHOOK_URL (Optional) Your Discord webhook URL

    Format for SKPORT_TOKENS:

    [
      {
        "accountToken": "YOUR_ACCOUNT_TOKEN_HERE",
        "accountName": "Your Nickname",
        "language": "en"
      }
    ]

    For multiple accounts, add more objects to the array. Available languages: en, ja, zh_Hant, zh_Hans, ko, ru_RU

Step 4: Enable GitHub Actions

Go to the Actions tab in your repository and enable workflows. The script will run automatically every day at 16:00 UTC (Midnight WIB). You can also trigger it manually via Run workflow.


Local Testing

  1. Install Bun.
  2. Copy .env.example to .env and fill in your ACCOUNT_TOKEN.
  3. Run:
    bun run start

How It Works

On each run, the script performs a full OAuth flow to generate fresh session credentials. This means no stored tokens ever go stale.

sequenceDiagram
    participant Script
    participant Gryphline as as.gryphline.com
    participant SKport as zonai.skport.com

    Script->>Gryphline: POST /user/oauth2/v2/grant<br/>(accountToken)
    Gryphline-->>Script: oauthCode (one-time)

    Script->>SKport: POST /user/auth/generate_cred_by_code<br/>(oauthCode)
    SKport-->>Script: cred (fresh session)

    Script->>SKport: GET /auth/refresh<br/>(cred)
    SKport-->>Script: signToken (signing key)

    Script->>SKport: GET /game/player/binding<br/>(cred + signed request)
    SKport-->>Script: gameRole (UID + server)

    Script->>SKport: POST /game/endfield/attendance<br/>(cred + gameRole + signed request)
    SKport-->>Script: ✅ Check-in result
Loading

Acknowledgements

Thanks to the community for reverse-engineering the SKport API

About

Automated daily check-in script for Arknights Endfield (SKport)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors