Back

[SOLVED] Flutter sdk 403 response

  • 0
  • Users
  • Flutter
  • Self Hosted
  • Accounts
Tengo
19 Oct, 2023, 12:17

Recently , me and @sanemi started working on flutter and we integrated appwrite for user login , We have code according to the appwrite sdk for dart/flutter and the code was fine and smooth while we complie, but when we are testing it is showing error code 403 ..... which means somme permissions are not there but we provided all the required deeds. We already setup flutter application integration in appwrite.

TL;DR
Summary: The user had an issue with a 403 response when using Flutter SDK with Appwrite. They discovered that they had missed adding the platform on the web and had not added the hostname. They added a wildcard in the hostname for development purposes and were able to make API calls successfully. The issue was related to CORS on Appwrite Cloud, which only allowed requests from localhost by default. They added Flutterflow domain in the Appwrite dashboard and had created a custom action integrating Appwrite and SDK. The 403 error occurred during the login process. The problematic block of code was found under the network tab in the error message. There was
Tessa
19 Oct, 2023, 17:37

@wess can you take a look at this?

D5
19 Oct, 2023, 18:20

Could you please share the problematic part of the code where you're getting the error?

Tengo
19 Oct, 2023, 18:21

@sanemi can you share network tab screen shot or curl request here??

sanemi
20 Oct, 2023, 05:37
sanemi
20 Oct, 2023, 05:38

and when i click to login button from which the action should be performed

sanemi
20 Oct, 2023, 05:39
sanemi
20 Oct, 2023, 05:41

As you can see the problematic block is under the network tab of error 403

D5
20 Oct, 2023, 07:01

When clicking in the error it specifies what's happening?

sanemi
20 Oct, 2023, 07:36

It shows 403 error forbidden

D5
20 Oct, 2023, 07:37

How are you performing the login?

D5
20 Oct, 2023, 07:37

Also, is this cloud?

sanemi
20 Oct, 2023, 07:40

We created action in flutter flow cloud where we integrated appwrite and sdk and all that in custom action

sanemi
20 Oct, 2023, 07:41

yes this is cloud

sanemi
20 Oct, 2023, 08:04
D5
20 Oct, 2023, 08:51

Did you have added flutterflow domain in your appwrite dashboard?

sanemi
20 Oct, 2023, 12:23

yes we did that

Tengo
31 Oct, 2023, 08:22

Hi @D5 I found that there is some issue related to cors on appwrite cloud. It is not allowed other domains to make request than localhost..

Haimantika
31 Oct, 2023, 09:11

Did you added your domain to the list of allowed domains? Only localhost is allowed by default

Tengo
31 Oct, 2023, 09:23

Earlier I was using flutter app on web so I was missed that platform adding in web and also hostname was not added that's why the issue was arrissed.. now I have added wildcard in hostname for development purpose so am able to make the api calls....

Tengo
31 Oct, 2023, 09:23

Thank you everyone for the help<:appwritefire:823999000330895380>

Haimantika
31 Oct, 2023, 09:25

Amazing! This means your issue is solved? πŸ˜„

Will go ahead and mark it as solved then πŸ™‚ You can reopen this if there is still an issue

Tengo
31 Oct, 2023, 09:26

Sure 😁

Haimantika
31 Oct, 2023, 09:29

Flutter sdk 403 response [SOLVED]

Drake
31 Oct, 2023, 13:04

[SOLVED] Flutter sdk 403 response

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