BigCommerce - Hello World App - Callback URLs

630 views Asked by At

I am trying to install the BigCommerce Hello World App from bigcommerce/hello-world-app-php-silex. When I try to install the app in my trial store it displays the index of the app folder. Index of the app folder.

I think it has something to do with the callback URLs. Callback URLs

The instructions are not clear as what to enter here so I entered:

index.php is located in bigcommerce/hello-world-app-php-silex

What am I supposed to enter for the Callback URLs?

Also, this is what I entered in the .env file for the environment variables.
BC_AUTH_SERVICE and BC_CALLBACK_URL environment variables

Update: Ok, I was able to get the index.php to load by default.
In Apache24/conf/httpd.conf, I changed "AllowOverride None" to "AllowOverride FileInfo", uncommented "LoadModule rewrite_module modules/mod_rewrite.so", and in the .htaccess file, in the root of the project, I removed the "/" that proceeded index.php so it now says "RewriteRule ^(.*)$ index.php/$1 [L]". The "/" needed to be removed because the project was not in the root directory.

Now I get two errors. It looks like this project was written to be in the root directory, so I put it in the root, put the "/" back in .htaccess, updated the URLs, and I still get the same two errors.

ResourceNotFoundException

NotFoundHttpException

3

There are 3 answers

2
KDS On

Add .htaccess in your project Root directory with this code

RewriteEngine on
#RewriteBase /

# only rewrite if the requested file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-s

# pass the rest of the request into index.php to handle
RewriteRule ^(.*)$ /index.php/$1 [L]

# Prevent the web from seeing the readme.md just to be safe
RewriteRule ^README\.MD$ - [L,F]
0
newb On

The Callback URLs need to include the path to /load and /auth/callback.

They are not paths to a folder, they are paths to a resource. That's why the error is ResourceNotFound.

The Callback URL in .env needs to be:
BC_CALLBACK_URL=https://localhost/auth/callback

0
WebCompany On

I will so many times I Will use every possibility but error was not solved let me know how you solve this error in your case.

https://i.stack.imgur.com/9nLKu.jpg

Here My .env file : 
BC_AUTH_SERVICE=https://login.bigcommerce.com
BC_CLIENT_ID=My client id
BC_CLIENT_SECRET=My secret id
BC_CALLBACK_URL=https://localhost/bigcommerce/callback/load

Here My Server path in dev tools file: 
Auth Callback URL - more info 
https://localhost/bigcommerce/callback
Load Callback URL - more info 
https://localhost/bigcommerce/load
Uninstall Callback URL - more info 
https:/localhost/bigcommerce/uninstall

Let me folder structure of Silex 
My localhost is Right now [ HTTPS ]  : https://localhost/bigcommerce/index.php