Organisation accept invitation throws error

trying to validate my invitation on the server side bad getting [Error [BetterCallAPIError]: API Error: BAD_REQUEST Invitation not found what am I missing? I checked the id on the db as well it seams all right, what am I missing?

  const acceptInvitation = await auth.api.acceptInvitation({
    headers: await headers(),
    body: {
      invitationId
    },
  }).catch((error) => {
    console.error('error', error)
  })
Was this page helpful?