[DOCS] cloud_functions onCall : How can I get idToken ?

Author: Patrick386Created Dec 15, 2022Updated Feb 8, 2026

Is there no user id token in context ?

How can I get idToken ?

Client: ex String token = await user.getIdToken();

Server

The context automagically contains metadata about the request such as uid and token.

exports.getConfiguration = functions
.runWith({enforceAppCheck: true})
.https.onCall(async(data, context) => {

 const token = context.IdToken ???
.....
}

Source: firebase/functions-samples