Skip to content

Commit e8198a4

Browse files
committed
README - Numbering fix
1 parent b89c1fd commit e8198a4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PHPShopify\ShopifyClient::config($config);
5151
##### How to get the permanent access token for a shop?
5252
There is a AuthHelper class to help you getting the permanent access token from the shop using oAuth.
5353

54-
1. First, you need to configure the client with additional parameter SharedSecret
54+
1) First, you need to configure the client with additional parameter SharedSecret
5555

5656
```php
5757
$config = array(
@@ -63,11 +63,12 @@ $config = array(
6363
PHPShopify\ShopifyClient::config($config);
6464
```
6565

66-
2. Create the authentication request
66+
2) Create the authentication request
6767

6868
> The redirect url must be white listed from your app admin as one of **Application Redirect URLs**.
6969
7070
```php
71+
//your_authorize_url.php
7172
$scopes = 'read_products,write_products,read_script_tags,write_script_tags';
7273
//This is also valid
7374
//$scopes = array('read_products','write_products','read_script_tags', 'write_script_tags');
@@ -76,17 +77,19 @@ $redirectUrl = 'https://yourappurl.com/your_redirect_url.php';
7677
\PHPShopify\AuthHelper::createAuthRequest($scopes, $redirectUrl);
7778
```
7879

79-
3. Get the access token when redirected back to the `$redirectUrl`
80+
3) Get the access token when redirected back to the `$redirectUrl` after app authorization.
8081

8182
```php
83+
//your_redirect_url.php
8284
PHPShopify\ShopifyClient::config($config);
8385
$accessToken = \PHPShopify\AuthHelper::getAccessToken();
8486
//Now store it in database or somewhere else
8587
```
8688

87-
> You can use the same page for creating the request and getting the access token. In that case just skip the 2nd parameter `$redirectUrl` while calling `createAuthRequest()` method. The AuthHelper class will do the rest for you.
89+
> You can use the same page for creating the request and getting the access token (redirect url). In that case just skip the 2nd parameter `$redirectUrl` while calling `createAuthRequest()` method. The AuthHelper class will do the rest for you.
8890
8991
```php
92+
//your_authorize_and_redirect_url.php
9093
PHPShopify\ShopifyClient::config($config);
9194
$accessToken = \PHPShopify\AuthHelper::createAuthRequest($scopes);
9295
//Now store it in database or somewhere else

0 commit comments

Comments
 (0)