Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lucdkny/22c3c5b9b37f2604f5b2d3d91dcf38f0 to your computer and use it in GitHub Desktop.
Save lucdkny/22c3c5b9b37f2604f5b2d3d91dcf38f0 to your computer and use it in GitHub Desktop.
Shopify authentification flow

Shopify authentification flow

Request URL:http://www.retailtower.com/app/settings/shopify.php?shop=retailer-lambda.myshopify.com&signature=1fa9c810fec17eea99b04ef21204c91b&timestamp=1370278389
Request Method:GET
Status Code:302 Moved Temporarily

Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr,en;q=0.8,en-US;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:www.retailtower.com
Pragma:no-cache
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36

Query String Parameters

shop:retailer-lambda.myshopify.com
signature:1fa9c810fec17eea99b04ef21204c91b
timestamp:1370278389

Response Headers

Connection:Keep-Alive
Content-Length:0
Content-Type:text/html; charset=UTF-8
Date:Mon, 03 Jun 2013 16:53:11 GMT
Keep-Alive:timeout=10, max=1000
Location:https://retailer-lambda.myshopify.com/admin/oauth/authorize?client_id=3d46901617d02ff5eb381b33ed75de3d&scope=read_products%2Cread_orders%2Cread_script_tags%2Cwrite_script_tags&redirect_uri=http%3A%2F%2Fwww.retailtower.com%2Fapp%2Fsettings%2Fshopify.php%3Fshop%3Dretailer-lambda.myshopify.com%26signature%3D1fa9c810fec17eea99b04ef21204c91b%26timestamp%3D1370278389
Server:Apache
X-Powered-By:PHP/5.2.14

==>

Request URL:https://retailer-lambda.myshopify.com/admin/oauth/authorize?client_id=3d46901617d02ff5eb381b33ed75de3d&scope=read_products%2Cread_orders%2Cread_script_tags%2Cwrite_script_tags&redirect_uri=http%3A%2F%2Fwww.retailtower.com%2Fapp%2Fsettings%2Fshopify.php%3Fshop%3Dretailer-lambda.myshopify.com%26signature%3D1fa9c810fec17eea99b04ef21204c91b%26timestamp%3D1370278389
Request Method:GET
Status Code:200 OK

Request Headers

GET /admin/oauth/authorize?client_id=3d46901617d02ff5eb381b33ed75de3d&scope=read_products%2Cread_orders%2Cread_script_tags%2Cwrite_script_tags&redirect_uri=http%3A%2F%2Fwww.retailtower.com%2Fapp%2Fsettings%2Fshopify.php%3Fshop%3Dretailer-lambda.myshopify.com%26signature%3D1fa9c810fec17eea99b04ef21204c91b%26timestamp%3D1370278389 HTTP/1.1
Host: retailer-lambda.myshopify.com
Connection: keep-alive
Cache-Control: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Pragma: no-cache
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: fr,en;q=0.8,en-US;q=0.6
Cookie: _secure_session_id=c3a545db151b5e4c628e71438bb05fb2; ki_u=2dc9fa68-9b1c-9cfb-8dd1-4d203c638408; _ab=1; storefront_digest=748749ccf562b909269862779353279ef2165ec1; _session_id=9f392da2cf382967f17321785c19bcbb; _shopify_y=5E2DDB76-F639-47E2-8892; _shopify_uniq=x; _ga=1.3.1141207012.1370266314; ki_t=1370266314706%3B1370266314706%3B1370274394491%3B1%3B16; __utma=1.1141207012.1370266314.1370269602.1370274394.3; __utmb=1.2.10.1370274394; __utmc=1; __utmz=1.1370266314.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

Query String Parameters

client_id=3d46901617d02ff5eb381b33ed75de3d&scope=read_products%2Cread_orders%2Cread_script_tags%2Cwrite_script_tags&redirect_uri=http%3A%2F%2Fwww.retailtower.com%2Fapp%2Fsettings%2Fshopify.php%3Fshop%3Dretailer-lambda.myshopify.com%26signature%3D1fa9c810fec17eea99b04ef21204c91b%26timestamp%3D1370278389

Response Headers

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 03 Jun 2013 16:53:10 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Status: 200 OK
X-Shopify-Asset-Version: 9e9dd842ca5c966893cf6d938daab5d2260c949a
X-Request-Id: ca8ff994a016c106e7bdcaa5626435d7
X-UA-Compatible: IE=Edge,chrome=1
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
Content-Encoding: gzip

==>

Request URL:https://retailer-lambda.myshopify.com/admin/oauth/grant
Request Method:POST
Status Code:302 Found

Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr,en;q=0.8,en-US;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Content-Length:507
Content-Type:application/x-www-form-urlencoded
Cookie:_secure_session_id=c3a545db151b5e4c628e71438bb05fb2; ki_u=2dc9fa68-9b1c-9cfb-8dd1-4d203c638408; _ab=1; storefront_digest=748749ccf562b909269862779353279ef2165ec1; _session_id=9f392da2cf382967f17321785c19bcbb; _shopify_y=5E2DDB76-F639-47E2-8892; _shopify_uniq=x; ki_t=1370266314706%3B1370266314706%3B1370279060452%3B1%3B17; _ga=1.3.1141207012.1370266314; __utma=1.1141207012.1370266314.1370269602.1370274394.3; __utmb=1.5.10.1370274394; __utmc=1; __utmz=1.1370266314.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Host:retailer-lambda.myshopify.com
Origin:https://retailer-lambda.myshopify.com
Pragma:no-cache
Referer:https://retailer-lambda.myshopify.com/admin/oauth/authorize?client_id=3d46901617d02ff5eb381b33ed75de3d&scope=read_products%2Cread_orders%2Cread_script_tags%2Cwrite_script_tags&redirect_uri=http%3A%2F%2Fwww.retailtower.com%2Fapp%2Fsettings%2Fshopify.php%3Fshop%3Dretailer-lambda.myshopify.com%26signature%3Dda2f385e68f769c43e3460c5eb1ecf33%26timestamp%3D1370279114
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36

Form Data

utf8:✓
authenticity_token:APpHRCv/pbtDAZgYEyMFzUbeZbFe2PALm0vb20cojMo=
client_id:3d46901617d02ff5eb381b33ed75de3d
api_permission[access_scope]:read_products,read_orders,write_script_tags
api_permission[redirect_uri]:http://www.retailtower.com/app/settings/shopify.php?shop=retailer-lambda.myshopify.com&signature=da2f385e68f769c43e3460c5eb1ecf33&timestamp=1370279114
api_permission[access_agreement]:0
api_permission[access_agreement]:1
commit:Install

Response Headers

Connection:keep-alive
Content-Type:text/html; charset=utf-8
Date:Mon, 03 Jun 2013 17:05:29 GMT
Location:http://www.retailtower.com/app/settings/shopify.php?shop=retailer-lambda.myshopify.com&signature=85b8b2a3a24d729f7550d6008f2714fd&timestamp=1370279129&code=5331c08886927c369a4ebca171b5546b
P3P:CP="NOI DSP COR NID ADMa OPTa OUR NOR"
Server:nginx
Status:302 Found
Transfer-Encoding:chunked
X-Request-Id:cafef21c5e2c9a3f1ded3b1d575d0140
X-Shopify-Asset-Version:9e9dd842ca5c966893cf6d938daab5d2260c949a
X-UA-Compatible:IE=Edge,chrome=1

==>

Request URL:http://www.retailtower.com/app/settings/shopify.php?shop=retailer-lambda.myshopify.com&signature=85b8b2a3a24d729f7550d6008f2714fd&timestamp=1370279129&code=5331c08886927c369a4ebca171b5546b
Request Method:GET
Status Code:200 OK

Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr,en;q=0.8,en-US;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:www.retailtower.com
Pragma:no-cache
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
Query String Parametersview sourceview URL encoded
shop:retailer-lambda.myshopify.com
signature:85b8b2a3a24d729f7550d6008f2714fd
timestamp:1370279129
code:5331c08886927c369a4ebca171b5546b

Response Headers

Connection:Keep-Alive
Content-Type:text/html; charset=UTF-8
Date:Mon, 03 Jun 2013 17:05:31 GMT
Keep-Alive:timeout=10, max=1000
Server:Apache
Set-Cookie:user=11924770319; expires=Wed, 03-Jul-2013 17:05:33 GMT; path=/app; domain=retailtower.com
Set-Cookie:userid=13214; expires=Wed, 03-Jul-2013 17:05:33 GMT; path=/app; domain=retailtower.com
Transfer-Encoding:chunked
X-Powered-By:PHP/5.2.14

more here about how to get the final access token from the temporary access token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment