Anycubic Cloud

Copy your Slicer token

Home Assistant needs the access token from Anycubic Slicer Next. The copy button copies the public command, not your token. The command reads the token on your computer and puts it on your clipboard.

  1. Open Anycubic Slicer Next, sign in and open the printer view.
  2. Copy the complete command for your operating system below and run it once.
  3. Wait for confirmation. Paste the token into Home Assistant in the Slicer Next step with Ctrl+V (Windows) or Cmd+V (macOS).
Windows · PowerShell
& {
    $ErrorActionPreference = 'Stop'
    $log = Get-ChildItem "$env:AppData\AnycubicSlicerNext\log\debug_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
    if (!$log) { throw 'No Slicer debug log found. Start Slicer, sign in and open the printer view.' }
    $token = (Select-String -Path $log.FullName -Pattern '(?:accessToken\s*=\s*|id_token=)(eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)' -AllMatches).Matches | ForEach-Object { $_.Groups[1].Value } | Select-Object -Last 1
    if (!$token) { throw 'No Slicer token found in the latest log.' }
    Set-Clipboard -Value $token
    if ((Get-Clipboard -Raw) -cne $token) { throw 'Could not confirm the token in the clipboard. Run the command again.' }
    Write-Host 'Token successfully copied to clipboard. Paste into Home Assistant with Ctrl+V now.' -ForegroundColor Green
}

macOS · Terminal
bash <<'ANYCUBIC_TOKEN'
f=
for candidate in "$HOME/Library/Application Support/AnycubicSlicerNext/log/"debug_*.log; do
    [ -f "$candidate" ] || continue
    if [ -z "$f" ] || [ "$candidate" -nt "$f" ]; then f=$candidate; fi
done
if [ -z "$f" ]; then printf '%s\n' 'No Slicer debug log found. Sign in and open the printer view.' >&2; exit 1; fi
t=$(grep -h -o -E '(accessToken[[:space:]]*=[[:space:]]*|id_token=)eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+' "$f" | tail -n 1 | sed -E 's/^(accessToken[[:space:]]*=[[:space:]]*|id_token=)//')
if [ -z "$t" ]; then printf '%s\n' 'No Slicer token found in the latest log.' >&2; exit 1; fi
if ! printf '%s' "$t" | pbcopy; then printf '%s\n' 'Could not copy token to clipboard.' >&2; exit 1; fi
copied=$(pbpaste) || exit 1
if [ "$copied" != "$t" ]; then printf '%s\n' 'Could not confirm the token in the clipboard. Run the command again.' >&2; exit 1; fi
printf '%s\n' 'Token successfully copied and verified. Paste into Home Assistant with Cmd+V now.'
ANYCUBIC_TOKEN

If authentication fails

The command supports both log formats, accessToken = and id_token=. It verifies that the token was copied completely; it does not confirm authentication with the cloud service. If needed, sign in to the Slicer again and run the command again.

Older integration versions may still check the previous token when you retry in the same dialog. Close that dialog and start a new attempt. You do not need to change the region.

Never share tokens or unredacted logs. Clear your clipboard after pasting, for example by copying any other text.

Detailed instructions and alternatives on GitHub