For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Get access token

The getAccessToken method returns the access token of the current Web3Auth session.

This method throws Web3AuthError.noUserFound if no access token is available, for example when no user is signed in.

Usage​

do {
let accessToken = try await web3Auth.getAccessToken()
} catch {
print(error.localizedDescription)
// Handle error
}
On this page