```swift import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID let oauth2 = Oauth2(client) let oauth2Grant = try await oauth2.createGrant( userCode: "" ) ```