How to add app url

Hello, i creatd an app but i dont know where to add Api URL because i have this error:

Oauth error invalid_request: The redirect_uri and application url must have matching hosts

And this is my code:

<?php require('vendor/autoload.php'); $config = array( 'ShopUrl' => '*******', 'ApiKey' => '*******', 'Password' => '*******', 'Curl' => array( CURLOPT_TIMEOUT => 10, CURLOPT_FOLLOWLOCATION => true ) ); PHPShopify\ShopifySDK::config($config); $scopes = 'read_products,write_products'; $redirectUrl = '[http://localhost:81/shopify/app.php](http://localhost:81/shopify/app.php)'; \PHPShopify\AuthHelper::createAuthRequest($scopes, $redirectUrl); ?>

Can you provide me help or a detailed tutorial how to achieve this ?

Thank you

You can’t use localhost as your redirectURL. If you are developing on your local machine you need to either use NGROK or Localtunnel to act as a passthrough to your local host.

Cheers,

Gary