Download the PHP package teraxis/etsy-php-sdk without Composer

On this page you can find all versions of the php package teraxis/etsy-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package etsy-php-sdk

Etsy PHP SDK

A PHP SDK for the Etsy API v3.

This package is still in development.

Requirements

PHP 7.1 or greater.

Install

Install the package using composer.

Include the OAuth client and Etsy class.

Usage

Authorizing your app

The Etsy API uses OAuth 2.0 authentication. You can read more about authenticating with Etsy on their documentation.

The first step in OAuth2 is to request an OAuth token. You will need an existing App API key which you can obtained by registering an app here.

Generate a URL to redirect the user to authorize access to your app.

Redirect URI

You must set an authorized callback URL. Check out the Etsy documentation for further information.

Scope

Depending on your apps requirements, you will need to specify the permission scopes you want to authorize access for.

You can get all scopes, but it is generally recommended to only get what you need.

Code challenge

You'll need to generate a PKCE code challenge and save this along with the verifier used to generate the challenge. You are welcome to generate your own, or let the SDK do this for you.

Nonce

The nonce is a single use token used for CSRF protection. You can use any token you like but it is recommended to let the SDK generate one for you each time you authorize a user. Save this for verifying the response later on.

The URL will redirect your user to the Etsy authorization page. If the user grants access, Etsy will send back a request with an authorization code and the nonce (state).

It is up to you to validate the nonce. If they do not match you should discard the response.

For more information on Etsy's response, check out the documentation here.

The final step is to get the access token for the user. To do this you will need to make a request using the code that was just returned by Etsy. You will also need to pass in the same callback URL as the first request and the verifier used to generate the PKCE code challenge.

You'll be provided with both an access token and a refresh token. The access token has a valid duration of 3600 seconds (1 hour). Save both of these for late ruse.

Refreshing your token

You can refresh your authorization token using the refresh token that was previously provided. This will provide you with a new valid access token and another refresh token.

The Etsy documentation states that refreshed access tokens have a duration of 86400 seconds (24 hours) but on testing they appear to only remain valid for up 3600 seconds (1 hour).

Exchanging legacy OAuth 1.0 token for OAuth 2.0 token

If you previously used v2 of the Etsy API and still have valid authorization tokens for your users, you may swap these over for valid OAuth2 tokens.

This will provide you with a brand new set of OAuth2 access and refresh tokens.

Basic use

Create a new instance of the Etsy class using your App API key and a user's access token.

Collections

When there is more than one result a collection will be returned.


Full documentation will be available soon. Email [email protected] for any assistance.

Contributing

Help improve this SDK by contributing.

Before opening a pull request, please first discuss the proposed changes via Github issue or email.

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of etsy-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
guzzlehttp/guzzle Version ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package teraxis/etsy-php-sdk contains the following files

Loading the files please wait ....