The Bearer token is a JWT token with your service AccessKey as the signing key and the full REST API path as the audience.
A sample code in JS:
const bearerToken = jwt.sign({}, connectionString.accessKey, {
audience: request.url,
expiresIn: "1h",
algorithm: "HS256",
});