GithubHelp home page GithubHelp logo

Comments (9)

omolto avatar omolto commented on August 15, 2024 2

+1

from shopify-api-php.

robjenman avatar robjenman commented on August 15, 2024

This morning I've seen that buried in your documentations here on Github (Versus not shown in any example on the API reference) is that this is targeted at Partner Apps and not consuming the API as a private app despite that being what is shown on the API reference pages.

As it wouldn't have a app key or secret you can't initialise and this can't be used.

from shopify-api-php.

paulomarg avatar paulomarg commented on August 15, 2024

Hi @Chutney, in order to make any requests to the Admin API you'll need to call Context::initialize, even if you're using a private app. You can see all of the parameters at https://github.com/Shopify/shopify-php-api/blob/main/docs/getting_started.md, and you'll need to set:

  • apiKey: your private app's API key
  • apiSecretKey: your private app's password
  • isPrivateApp: true

You can see your private app's settings in your Admin:

  • Go to Apps
  • Click on Manage private apps under the app list
  • Click on your app's name
  • Your app's details will be under the Admin API section, as API key and password

I'll update the documentation to make it easier to see how to use the api key and password for private apps, thank you for raising this!

from shopify-api-php.

chdig avatar chdig commented on August 15, 2024

Yes, this is quite a major problem for what seems to be the official Shopify Library, and I'd like to request updated documentation as well.

The getting started page doesn't mention private app set up at all.

It seems to imply that there's a long list of parameters to pass as an array to the initialize method, but then the example shows them as arguments instead of parameters. It is not clear which to make. Normally initialize methods take arrays, but this seems not to.

The documentation implies that a session manager object is needed to connect to a private app, using oAuth. In fact, rest calls can be made with normal token/url for private apps. This could be made clearer.

from shopify-api-php.

LZL0 avatar LZL0 commented on August 15, 2024

Are there any updates regarding this issue?

from shopify-api-php.

github-actions avatar github-actions commented on August 15, 2024

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

from shopify-api-php.

github-actions avatar github-actions commented on August 15, 2024

We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!

from shopify-api-php.

faridmovsumov avatar faridmovsumov commented on August 15, 2024

I have the same problem

from shopify-api-php.

darius00klokj avatar darius00klokj commented on August 15, 2024

hey guys,

Call the Context::initialize static function, you will need KEY, SECRET, SCOPES, SHOP NAME and a FileStorageSession.
The first 3 you get from the dev app created on your shopify dashboard.

As example

Context::initialize( getenv('SHOP_APP_KEY'), getenv('SHOP_APP_SECRET'), 'read_customers, read_discounts, read_discovery, read_draft_orders, read_assigned_fulfillment_orders, read_merchant_managed_fulfillment_orders, read_order_edits, read_orders, write_orders, read_third_party_fulfillment_orders, read_order_submission_rules', getenv('SHOP_APP_NAME'), new FileSessionStorage('/tmp/php_sessions') );

Run the initialize before your Rest api calls.

from shopify-api-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.