Back

Error 400 Invalid `success` param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.i

  • 1
  • Auth
  • Web
  • Functions
  • Cloud
CodePanda
3 Jun, 2024, 17:16

Type : general_argument_invalid

I am building an ai chatbot that is hosted on my own website mywebsite.com under a subdomain of mybot.mywebsite.com with webpages

  • "mybot.mywebsite.com/login.html" for the authentication page using OAuth2.0 with providers like Google
  • "mybot.mywebsite.com/callback.html" for callback page to return from authetication page so that I can save the user info
  • "mybot.mywebsite.com/chatbot.html" for the UX of chatbot, which calls appwrite function to get ai's response

To power my website, I have set up appwrite backend-as-a-service for oauth2.0 and I have written a few appwrite functions using python runtime

  • chatbot function that takes a question and some additional context and responds with a line of text
  • save-user-info function to save the user's information after successful authentication

The problem I am running into is that, when I call sdk.account.createOAuth2Session with "https://mybot.mywebsite.com/callback.html" as successful URL and "https://mybot.mywebsite.com/login.html for failure url, I am getting an error saying that the success URL needs to be a website using cloud.appwrite.io or appwrite.io

I saw a support entry asking to add my web page hostiong site to my appwrite project's "custom domains". I tried doing it and the website is getting (see attached)

and the error of

Error 400 Invalid success param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io Type : general_argument_invalid

is persisting

TL;DR
Developers are encountering an error message stating that the success URL host must be one of the specified options. The issue arises when attempting to call sdk.account.createOAuth2Session with custom URLs. A possible solution to this problem is to add the website hosting site to the appwrite project's "custom domains."
CodePanda
3 Jun, 2024, 17:18

When I "Retry certificate generation" - I am getting

Domain verification failed. Please check if your DNS records are correct and try again.

CodePanda
3 Jun, 2024, 17:44

I presume there should be a simple fix and I am doing something stupid

CodePanda
3 Jun, 2024, 17:44

What am I missing here?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more