#!/usr/bin/env python3
"""Check if access token is valid and can be read correctly."""
import os
from dotenv import load_dotenv

load_dotenv()

token = os.getenv("WHATSAPP_ACCESS_TOKEN")
print(f"Token loaded: {'✓' if token else '✗'}")
print(f"Token length: {len(token) if token else 0}")
print(f"Token (first 50 chars): {token[:50] if token else 'None'}")
print(f"Token (last 50 chars): {token[-50:] if token else 'None'}")
print(f"\nFull token:\n{token}")
