C# Class Sharpify.ShopifyAPIAuthorizer

this class is used to obtain the authorization from the shopify customer to make api calls on their behalf
Show file Open project: orospakr/sharpify Class Usage Examples

Public Methods

Method Description
AuthorizeClient ( string code ) : Task

After the shop owner has authorized your app, Shopify will give you a code. Use this code to get your authorization state that you will use to make API calls

GetAuthorizationURL ( string scope, string redirectUrl = null ) : string

Get the URL required by you to redirect the User to in which they will be presented with the ability to grant access to your app with the specified scope

ShopifyAPIAuthorizer ( string shopName, string apiKey, string secret ) : System

Creates an instance of this class in order to obtain the authorization from the shopify customer to make api calls on their behalf

make sure that the shop name parameter is the only the subdomain part of the myshopify.com url.

Method Details

AuthorizeClient() public method

After the shop owner has authorized your app, Shopify will give you a code. Use this code to get your authorization state that you will use to make API calls
public AuthorizeClient ( string code ) : Task
code string a code given to you by shopify
return Task

GetAuthorizationURL() public method

Get the URL required by you to redirect the User to in which they will be presented with the ability to grant access to your app with the specified scope
public GetAuthorizationURL ( string scope, string redirectUrl = null ) : string
scope string
redirectUrl string
return string

ShopifyAPIAuthorizer() public method

Creates an instance of this class in order to obtain the authorization from the shopify customer to make api calls on their behalf
make sure that the shop name parameter is the only the subdomain part of the myshopify.com url.
public ShopifyAPIAuthorizer ( string shopName, string apiKey, string secret ) : System
shopName string name of the shop to make the calls for.
apiKey string the unique api key of your app (obtained from the partner area when you create an app).
secret string the secret associated with your api key.
return System