Actually yes. Just noticed this! It is working, but the error is confusing... 😄
Actually yes. Just noticed this! It is working, but the error is confusing... 
wrangler d1 export on a newer version of wrangler and send them the sql?wrangler d1 list
✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxx/d1/database) failed.
Authentication error [code: 10000]wrangler logout and wrangler login workedSuccessfully logged in.
✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxx/d1/database) failed.
Authentication error [code: 10000]
Getting User settings...
👋 You are logged in with an OAuth Token, associated with the email xxxxxxx!
┌──────────────────────────────────────────┬──────────────────────────────────┐
│ Account Name │ Account ID │
├──────────────────────────────────────────┼──────────────────────────────────┤
│ xxxxxxx's Account │ xxxxxxx │
└──────────────────────────────────────────┴──────────────────────────────────┘
🔓 Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
- account (read)
- user (read)
- workers (write)
- workers_kv (write)
- workers_routes (write)
- workers_scripts (write)
- workers_tail (read)
- d1 (write)
- pages (write)
- zone (read)
- ssl_certs (write)
- constellation (write)
- ai (write)
- queues (write)
- offline_accessaccount_id in your Wrangler.toml?wrangler d1 export hasn't been removedexport?
wrangler d1 pull command, that exports the DB into the correct place in the .wrangler directory so you can use it locally? You can do that manually rn, but it isn't the most ergonomic thing to dowrangler d1 list
✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxx/d1/database) failed.
Authentication error [code: 10000]Successfully logged in.
✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxx/d1/database) failed.
Authentication error [code: 10000]
Getting User settings...
👋 You are logged in with an OAuth Token, associated with the email xxxxxxx!
┌──────────────────────────────────────────┬──────────────────────────────────┐
│ Account Name │ Account ID │
├──────────────────────────────────────────┼──────────────────────────────────┤
│ xxxxxxx's Account │ xxxxxxx │
└──────────────────────────────────────────┴──────────────────────────────────┘
🔓 Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
- account (read)
- user (read)
- workers (write)
- workers_kv (write)
- workers_routes (write)
- workers_scripts (write)
- workers_tail (read)
- d1 (write)
- pages (write)
- zone (read)
- ssl_certs (write)
- constellation (write)
- ai (write)
- queues (write)
- offline_accessexportwrangler d1 pullexports.wranglerconst memory = new BufferMemory({
returnMessages: true,
chatHistory: new CloudflareD1MessageHistory({
tableName: 'stored_message',
sessionId: 'example2',
database: env.DB,
}),
});
await memory.saveContext({ input: 'My name is TOMER' }, { output: 'Ok got it' });