Skip to content

Documentation / expo / createPrivyClient

Function: createPrivyClient()

createPrivyClient(__namedParameters): Object

Creates an instance of the Privy client.

Parameters

__namedParameters: PrivyOptions

Returns

Object

getAccessToken

getAccessToken: () => Promise<null | string>

Returns

Promise<null | string>

getIdentityToken

getIdentityToken: () => Promise<null | string>

Returns

Promise<null | string>

Example

ts
const privy = createPrivyClient({
  appId: '<your-privy-app-id>',
  clientId: '<your-privy-app-client-id>',
})

const token = await privy.getAccessToken();