Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 566 Bytes

File metadata and controls

18 lines (15 loc) · 566 Bytes
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.OAuthProvider

val client = Client(context)
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

account.createOAuth2Session(
    provider = OAuthProvider.AMAZON,
    success = "https://example.com", // (optional)
    failure = "https://example.com", // (optional)
    scopes = listOf(), // (optional)
)```