If you haven’t already, generate your API credentials. These credentials are used to verify that it is you! — It is very important to not share your API credentials with anyone! Failure to comply may result in unexpected expenditure. :(

It’s free to generate api keys, however an account IS required with our store. Furthermore, if doing more than your credited “freebies” it is $0.05 per search. Hint’s why it’s VERY important to keep your API credentials SAFE. Click the button below to begin!

This content is reserved for logged in customers. Please login or register!

Authentication

We provide two methods of authentication.

  1. You can provide your API credentials directly in the URL get request through parameters consumer_key && consumer_secret.
  2. You can provide your API credentials in a basic-auth header where username = api_key and password = api_secret. (recommended)

Example Url Params:

&consumer_key={api_key}&consumer_secret={api_secret}

Example Auth Header:

'Authorization' => 'Basic ' . base64_encode( api_key . ':' . api_secret )

API Endpoints

For now, we have one endpoint to keep things simple. Consumer_key and consumer_secret are optional if you can’t get basic-auth headers working.

GET /wp-json/yesneo_api/v1/pins

Parameters:

  • username (required): STRING | not case-sensitive.
  • consumer_key (optional): STRING | case-sensitive.
  • consumer_secret (optional): STRING | case-sensitive.

Example Response:

  • Success:
    {"success":true,"data":{"username":"exodia3929","pin":["3929"]}}
  • Error:
    {"code":"yesneo_api_error","message":"Username is invalid.","data":{"status":404}}

Debugging

There are two possible status codes. — 401 && 404

404 = Bad Request | Associated with an incorrect username format.
401 = Unauthorized | Insufficient balance, bad API credentials, un-secure request.

Examples

Javascript XHR:

//Basic Header Auth

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://yesneo.net/wp-json/yesneo_api/v1/pins?username={neopets_username}");
xhr.setRequestHeader("Authorization", "Basic base64encodedauthstring");
xhr.setRequestHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("Host", "www.yesneo.net");

xhr.send();


//Url Param Auth

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://yesneo.net/wp-json/yesneo_api/v1/pins?username={neopets_username}&consumer_key={api_key}&consumer_secret={api_secret}");
xhr.setRequestHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("Host", "www.yesneo.net");

xhr.send();

Python Requests:

//Basic Header Auth

import requests
neopets_username = 'your username'
url = "https://yesneo.net/wp-json/yesneo_api/v1/pins?username="+neopets_username
headers = {
  'Authorization': 'Basic base64encodedauth',
  'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36',
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Host': 'www.yesneo.net'
}

response = requests.get(url, headers=headers)

print(response.text.encode('utf8'))


//Url Param Auth

import requests
neopets_username = 'your username'
auth_cred = '&consumer_key={api_key}&consumer_secret={api_secret}'
url = "https://yesneo.net/wp-json/yesneo_api/v1/pins?username="+neopets_username+auth_cred
headers = {
  'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36',
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Host': 'www.yesneo.net'
}

response = requests.get(url, headers=headers)

print(response.text.encode('utf8'))

No products in the cart.