Created
November 27, 2014 14:48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set variables for our request | |
$shop = "demo-shop"; | |
$api_key = "1r30mrvCFMfq2DLGuIXyY2veEJVgTtDD"; | |
$scopes = "read_orders,write_products"; | |
$redirect_uri = "http://localhost/generate_token.php"; | |
// Build install/approval URL to redirect to | |
$install_url = "https://" . $shop . ".myshopify.com/admin/oauth/authorize?client_id=" . $api_key . "&scope=" . $scopes . "&redirect_uri=" . urlencode($redirect_uri); | |
// Redirect | |
header("Location: " . $install_url); | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been following your example code to setup an app and i'm stuck at authentication step. When user allows to install app it redirects to generate_token.php, where i get this error that says *“This request is NOT from Shopify!”
I debugged the values of $signature and md5($signature_data) and looks like they are not the same. What can i do with it now?
Please have a look at my question for more detail: http://stackoverflow.com/questions/36234627/shopify-generating-a-shopify-api-token-this-request-is-not-from-shopify