Comparison
Identifiers and secrets are not the same thing
These all come out as a random-looking string, so they get used for each other’s jobs. The dividing line is whether the string is merely unique or must also be unguessable, and getting that the wrong way round is a security bug rather than a style choice.
Side by side
| Must be unique | Must be unguessable | Expires | Safe in a URL | |
|---|---|---|---|---|
| UUID v4 | Yes | Not guaranteed | No | Yes |
| GUID | Yes | Not guaranteed | No | Yes |
| API key | Yes | Yes | When revoked | No |
| TOTP code | No | Yes | Every 30 seconds | No |
| JWT | Yes | It is signed, not secret | At its exp claim | Only if short-lived |
The short answer
GUID is simply Microsoft’s name for a UUID, so the two tools produce the same thing. The one that catches people out is the JWT: it is signed, not encrypted, so anyone holding it can read every claim inside by decoding the middle section. Never put anything in a JWT payload that the bearer should not see.
In more detail
A JWT is signed, not secret
The middle section is Base64 of plain JSON and anybody holding the token can read every claim in it. The signature proves the token has not been altered; it does nothing to conceal the contents. Putting an email address, a role or an internal identifier in there is handing it to whoever holds the token, which includes anybody who obtains it.
Unique and unguessable are different requirements
A UUID v4 is unique with overwhelming probability and is not a secret - it is generated from randomness, but nothing about the format guarantees the generator was cryptographically secure. Using one as an access token means an identifier is doing a secret's job, which is how unlisted URLs turn out to be guessable.
Why a TOTP code expires so quickly
It is derived from a shared secret and the current time in thirty-second steps, so an intercepted code is useless almost immediately. The secret behind it is the thing worth protecting; it never changes, and anybody holding it can generate codes forever. That is why pasting a real secret into any website, including this one, is a bad idea.