getToken

open override fun getToken(): String

Returns the bearer token to send with the next request.

Called per request; returning the same value repeatedly is the normal case. The SDK never caches the result, so a credential that swaps its token in place is picked up immediately by an already-constructed Portal.

Throwing is allowed — the SDK normalizes any failure to io.portalhq.android.exceptions.PortalException.Credentials.PortalCredentialError. Throw that type directly to control the reported io.portalhq.android.exceptions.PortalCredentialErrorReason.