docs

Home All functions Legacy functions Categories

vuOAuthBeginLogin()

vuOAuthBeginLogin(*CSTRING Provider,*CSTRING AccountKey,*CSTRING ClientId,*CSTRING Tenant,*CSTRING Scopes,*CSTRING FlowType,*CSTRING OutText,LONG OutTextLen),SIGNED,PROC,PASCAL,RAW,NAME('vuOAuthBeginLogin')

Purpose

Starts an OAuth login flow for the specified provider and account key.

This call initializes the provider-specific login state, chooses the appropriate login flow, and writes status or detail text into OutText.

Parameters

Parameter Type Description
Provider *CSTRING Provider name, such as google or microsoft.
AccountKey *CSTRING Account key used to isolate stored OAuth state for this login.
ClientId *CSTRING OAuth client or application ID.
Tenant *CSTRING Tenant or authority string when the provider requires it.
Scopes *CSTRING Space-delimited OAuth scopes to request.
FlowType *CSTRING Flow mode string used by the provider-specific login implementation.
OutText *CSTRING Output buffer receiving status or detail text from the BeginLogin call.
OutTextLen LONG Size of the OutText buffer in bytes.

Return value / error codes

Notes

Example (Clarion)

MAP
  MODULE('vuMailKit.dll')
    vuOAuthBeginLogin(*CSTRING Provider,*CSTRING AccountKey,*CSTRING ClientId,*CSTRING Tenant,*CSTRING Scopes,*CSTRING FlowType,*CSTRING OutText,LONG OutTextLen),SIGNED,PROC,PASCAL,RAW,NAME('vuOAuthBeginLogin')
  END
END

provider    CSTRING(32)
accountKey  CSTRING(128)
clientId    CSTRING(256)
tenant      CSTRING(128)
scopes      CSTRING(512)
flowType    CSTRING(64)
outText     CSTRING(1024)
outLen      LONG
rc          LONG

provider   = 'microsoft'
accountKey = 'user@example.com'
clientId   = 'your-client-id'
tenant     = 'common'
scopes     = 'offline_access https://graph.microsoft.com/Mail.Send'
flowType   = ''
outText    = ''
outLen     = SIZE(outText)

rc = vuOAuthBeginLogin(provider, accountKey, clientId, tenant, scopes, flowType, outText, outLen)
MESSAGE('rc=' & rc & ' text=' & outText)

See also

Home All functions Legacy functions Categories