Moment generating function of multinomial distribution

Suppose that $X$ is a Multinomial($n, \textbf{p}$) r.v., where $\textbf{p}$ = $(p_1, . . . , p_k)$. That is, $X$ is a random vector in $\{0, 1, \ldots , n\}^k$.

Find its multivariate moment generating function $M_{X}$, defined by: $M_{\textbf{X}}(\textbf{t}) := \mathbb{E}[exp(\textbf{t}^T \textbf{X})] = \mathbb{E}[exp(\sum\limits_{i=1}^k t_{i} \textbf{X}_{i})]$

So far from the definition I have done:

$\mathbb{E}[exp(\sum\limits_{i=1}^k t_{i} \textbf{X}_{i})]$

=$\mathbb{E}[\prod\limits_{i=1}^n exp(\textbf{t}^T \textbf{X})]$

=$\prod\limits_{i=1}^n\mathbb{E}[exp(\sum\limits_{i=1}^k t_{i} \textbf{X}_{i})]$ (by independence)

I know this is in the form of a moment generating function so

=$\prod\limits_{i=1}^n M_{Xi}(t)$

Could you explain the next part and correct any prior mistakes, I feel like I'm missing something obvious.

Thank you.

Let $S$ denote the set $\{ x \in \{ 0, \ldots, n\}^k : \sum_{i=1}^k x_i = n \}$ \begin{align} \mathbb{E}\left[ \exp \left( \sum_{i=1}^k t_iX_i \right) \right] &= \sum_{x \in S} \binom{n}{x_1 \ldots x_k} \prod_{i=1}^k p_i^{x_i} e^{t_ix_i} \\ &= \sum_{x \in S} \binom{n}{x_1 \ldots x_k} \prod_{i=1}^k \left(p_ie^{t_i} \right)^{x_i}\\ &=\left( \sum_{i=1}^kp_ie^{t_i}\right)^n \end{align}