Error Details:
TypeScript
{
"message": "The requested route was not found. Please refer to the API docs and try again.",
"code": 404,
"type": "general_route_not_found",
"version": "1.6.1"
}
Implementation:
TypeScript
class AppwriteService {
private let client: Client
private let account: Account
init() {
client = Client()
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject(PROJECT_ID)
account = Account(client)
}
func createOAuth2Session() async -> String? {
do {
return try await account.createOAuth2Token(
provider: .google,
success: "https://cloud.appwrite.io/v1/auth/oauth2/success",
failure: "https://cloud.appwrite.io/v1/auth/oauth2/failure"
)
} catch {
print("Error creating OAuth2 session: \(error)")
return nil
}
}
}
Reproduction Steps:
- Initialize Appwrite client with proper credentials
- Call
createOAuth2Session() - Attempt Google sign-in
- Redirect fails with 404 error
Environment:
- Appwrite SDK Version: 1.6.1
- Platform: iOS
- Authentication Provider: Google OAuth
Questions:
- Are these the correct redirect URLs for Appwrite OAuth implementation?
- Do we need to configure additional settings in the Appwrite console?
- Is there a specific format for redirect URLs that should be followed?
Any guidance on resolving this issue would be greatly appreciated. Thank you.
TL;DR
OAuth redirection issue when using Appwrite iOS SDK. Error code 404: "general_route_not_found." The provided implementation seems correct. Check redirect URLs, verify Appwrite console settings, ensure proper format for URLs.Recommended threads
- I'm getting error Invalid `url` param: I...
``` 2025-10-26T12:52:02.292Z [error] AppwriteException: Invalid `url` param: Invalid URI. Register your new client (vercel.com) as a new Web platform on your pr...
- 🚨 Access Restricted Despite Active Cred...
Hello Appwrite Support Team, My organization “Dreamo World Entertainment” currently shows an “Access Restricted” warning due to unpaid invoices. However, my bi...
- Deploy tanstack-start on site
- I am trying to deploy my project build with tanstack-start on site. - issue i am facing is appwrite doesnt provide start command option so i can run 'npm run ...