Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v10 missing comparible ´ShopifyAPI::ApiPermission.destroy´ for uninstalling apps #938

Closed
forsbergplustwo opened this issue Apr 21, 2022 · 2 comments

Comments

@forsbergplustwo
Copy link
Contributor

Issue summary

With the new breaking v10 api change, ShopifyAPI::ApiPermission.destroy methods is missing. Is there any plan in adding this back? It is a Shopify App Store requirement that apps can be uninstalled from within the apps user interface. I've looked through v10 and cannot see any method that can be used for this purpose.

Expected behavior

ShopifyAPI::ApiPermission.destroy should destroy the current shop's installation of the app.

Actual behavior

Method does not exist

Previous implementation

https://github.com/Shopify/shopify_api/blob/v9/lib/shopify_api/resources/api_permission.rb

module ShopifyAPI
  class ApiPermission < Base
    def self.destroy
      delete(:current)
    end
  end
end
10:14:55 web-log.1   |   HTTP DELETE (648.87ms)   https://redacted.myshopify.com:443/admin/api/2022-04/api_permissions/current.json
10:14:55 web-log.1   |   Response status   Net::HTTPOK (200)

Steps to reproduce the problem

Shop.first.with_shopify_session do
puts ShopifyAPI::ApiPermission.destroy
end

Specifications

shopify_api version: 10.0.0
Shopify API version used (example: 2022-04): 2022-04

@forsbergplustwo
Copy link
Contributor Author

Closing this as it turns out, we are no longer allowed to revoke API permissions from inside our app UI 👍

@rounders
Copy link

Closing this as it turns out, we are no longer allowed to revoke API permissions from inside our app UI 👍

We're you able to find documentation somewhere that confirms this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants