Skip to content
Back

Cannot connect server to github 1.8.0 with error Failed to retrieve access token from GitHub API.

  • 0
  • 3
  • Self Hosted
Prateek Jain
22 Nov, 2025, 15:05

I checked all the steps and also validated the openssl key with the command given ... I am getting terminal response as valid key but the issue is something else...this is the logs:-

TypeScript
appwrite                              | [Error] Timestamp: 2025-11-22T14:28:27+00:00
appwrite                              | [Error] Method: GET
appwrite                              | [Error] URL: /v1/vcs/github/callback
appwrite                              | [Error] Type: Exception
appwrite                              | [Error] Message: Failed to retrieve access token from GitHub API.
appwrite                              | [Error] File: /usr/src/code/vendor/utopia-php/vcs/src/VCS/Adapter/Git/GitHub.php
appwrite                              | [Error] Line: 353

i am sharing the link as well so that someone can help by checking the error logs in that link https://hetz1.shaashvatsolutions.com/v1/vcs/github/callback?code=1d25000b90106fef8a54&installation_id=95352693&setup_action=update&state=%7B%22projectId%22%3A%22691c8df30037aaeece18%22%2C%22success%22%3A%22https%3A%5C%2F%5C%2Fhetz1.shaashvatsolutions.com%5C%2Fconsole%5C%2Fproject-default-691c8df30037aaeece18%5C%2Ffunctions%5C%2Fcreate-function%3Ffrom%3Dgithub%26to%3Dcover%22%2C%22failure%22%3A%22https%3A%5C%2F%5C%2Fhetz1.shaashvatsolutions.com%5C%2Fconsole%5C%2Fproject-default-691c8df30037aaeece18%5C%2Ffunctions%5C%2Fcreate-function%3Ffrom%3Dgithub%26to%3Dcover%22%7D

TL;DR
User is unable to connect server to Github 1.8.0, encountering the error "Failed to retrieve access token from GitHub API." User is using Appwrite 1.8.1 and is seeking guidance on setting up a Github app with Appwrite functions. Deadline is nearing, help is requested.
Devika
22 Nov, 2025, 15:21

Have you correctly set your domain there?

Devika
22 Nov, 2025, 15:22

Because as per the error in the link, the part 'Access-Control-Allow-Origin' => 'https://localhost', mentions https://localhost as the allowed origin instead of your domain

Prateek Jain
22 Nov, 2025, 15:41

Ohhh....but the domain is correctly set as then only I am able to access the server via appwrite console on that domain.....the domain redirects to appwrite console

Prateek Jain
22 Nov, 2025, 15:41

Is there any other variable I need to define???

22 Nov, 2025, 16:07

Do you have any variable named APPWRITE_ALLOWED_DOMAINS or something similar? If yes, make sure your domain is set as it's value

23 Nov, 2025, 15:47

Ok will check once ....and let u know...thanks

1
24 Nov, 2025, 07:54

no..there is no variable like that...shall i create one??? and what should be the value set??

24 Nov, 2025, 08:08

your domain must be the value

24 Nov, 2025, 08:49

ok will add now and check

1
24 Nov, 2025, 09:02

Please make sure you are doing that keeping in mind the version of Appwrite you are using. As things may vary for different versions

24 Nov, 2025, 09:03

Always prefer reading the relevant docs carefully before making any changes

6 Feb, 2026, 17:11

bro did u found anything?

6 Feb, 2026, 18:24

hey, i'm using 1.8.1 can u tell me what changes i have to do to setup github app to my appwrite? cuz i was unable to setup functions. And bad part is my deadline is near. Could you please help me out?

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