user109502: I've tried:
bitcoin-cli sethdseed 'word1 word2 ...'
but i got invalid private key.
please help me getting my 24 word seed using bitcoin core

user7272: You can't.
Bitcoin Core is not BIP39 compliant.

user13866: 
How to get my 24 word seed using bitcoin-cli

You write about getting but your commands are about setting. This is confusing.
You can't get a seed-phrase from Bitcoin-core.
You can use the sethdseed function to "Set or generate a new HD wallet seed." this marks any existing private keys as inactive (which may or may not be what you want).
Note that an HD seed and a (24 word) seed phrase are different things.


I've tried: bitcoin-cli sethdseed 'word1 word2 ...' but i got invalid private key.

I think that may be because the second argument is not a seed phrase but a WIF key.


"seed"               (string, optional) The WIF private key to use as the new HD seed;



Related questions with useful answers (assuming you're trying to get seed-words out of Bitcoin Core because you think thats whats needed to transfer to another wallet that uses them)

How can I transfer a Bitcoin-qt wallet to Electrum?
How To Transfer Coins From Bitcoin Core to Electrum to avoid Sync Process?
Having trouble transfering private keys from Bitcoin Core to Electrum, for want of not having to wait for sync


109502: <p>I've tried:
bitcoin-cli sethdseed 'word1 word2 ...'
but i got invalid private key.
please help me getting my 24 word seed using bitcoin core</p>
 7272: <p>You can't.</p>
<p>Bitcoin Core is not BIP39 compliant.</p>
 13866: <blockquote>
<p><strong>How to get my 24 word seed using bitcoin-cli</strong></p>
</blockquote>
<p>You write about <em>getting</em> but your commands are about <em>setting</em>. This is confusing.</p>
<p>You can't <strong>get</strong> a seed-phrase from Bitcoin-core.</p>
<p>You can use the <a href="https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/sethdseed/" rel="nofollow noreferrer">sethdseed</a> function to <em>&quot;Set or generate a new HD wallet seed.&quot;</em> this marks any existing private keys as inactive (which may or may not be what you want).</p>
<p>Note that an <code>HD seed</code> and a (24 word) <code>seed phrase</code> are different things.</p>
<hr />
<blockquote>
<p><strong>I've tried: bitcoin-cli sethdseed 'word1 word2 ...' but i got invalid private key.</strong></p>
</blockquote>
<p>I think that may be because the second argument is not a seed phrase but a <a href="https://en.bitcoin.it/wiki/Wallet_import_format" rel="nofollow noreferrer">WIF</a> key.</p>
<blockquote>
<ol start="2">
<li>&quot;seed&quot;               (string, optional) The WIF private key to use as the new HD seed;</li>
</ol>
</blockquote>
<hr />
<p>Related questions with useful answers (assuming you're trying to get seed-words out of Bitcoin Core because you think thats whats needed to transfer to another wallet that uses them)</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/q/12763/13866">How can I transfer a Bitcoin-qt wallet to Electrum?</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/74031/13866">How To Transfer Coins From Bitcoin Core to Electrum to avoid Sync Process?</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/88195/13866">Having trouble transfering private keys from Bitcoin Core to Electrum, for want of not having to wait for sync</a></li>
</ul>
