EvaldoMaciel

jQuery Oauth1

Oct 5th, 2020
115
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <head>
  3. <script type='text/javascript' src='http://www.manmade.se/shopify/addtohomescreen/jquery.1.7.2.min.js'></script>;
  4. <script type="text/javascript">
  5.  
  6. $(document).ready(function() {                        
  7. var url = 'https://manmade-shop.myshopify.com/admin/oauth/access_token';;    
  8. var data = JSON.stringify({ client_id: 'xxxxx', client_secret: 'xxxxxx', scope: 'read_products' });
  9.  
  10. $.ajax({
  11.     type: 'GET',
  12.     url: url,
  13.     data: data,
  14.     success: function(data) {
  15.         alert("ok");
  16.         //debugger;
  17.     },
  18.     error: function(data) {
  19.         alert("not ok");
  20.        // debugger;
  21.     }
  22. });
  23. });
  24. </script>
  25. </head>
  26. <body>
  27. Hello World!
  28. </body>
  29. </html>
  30.  
RAW Paste Data