Quick start
Get your API key and send your first Rye API request!
For a live production example of creating an order using the Rye SDK in TypeScript, check out our Order from Amazon in TypeScript guide.
Grab your API Key
To make requests to the Rye GraphQL API, you will need to get an API access key by signing up on the Rye console. To do so:
- Navigate, and log in to https://staging.console.rye.com
- Under Access and Security, view and copy your API key
Grab the API header from console
Find out more about authorizations needed to use Rye.
Install a GraphQL library
Rye APIs are exposed via GraphQL. While it is possible to make requests to Rye using any HTTP client, we recommend using a dedicated GraphQL client library for ease of use. This tutorial will use the graphql-request
library as it is lightweight and easy to use. You can install it using any Node.js package manager:
Initialize a GraphQL client
Initialize a GraphQL client with your API key via the following recipe:
For a real integration, the Rye-Shopper-IP
header should be set to the IP address of the shopper making the request. This is important for fraud detection and prevention.
Making your first GraphQL request
Here is an example of fetching some products via GraphQL using the client we just set up.
Explore the rest of the API
Explore the entire API offering live on the Rye Console. Take a glance through the remaining docs to figure out how the Rye API can integrate into your app!
Was this page helpful?