The API is using API TOKENS to authenticate requests. You can view and manage your API tokens in the MockupsJar Profile. https://mockupsjar.com/profile

BASE API ADDRESS: <https://api.mockupsjar.com>

An easy way to test if your token is working properly is using the following script:

const axios = require('axios')
const API_URL = '<https://api.mockupsjar.com>'
const API_TOKEN = process.env.API_TOKEN // Put your API TOKEN in here

axios({
    method: 'get',
    url: `${API_URL}/mockups/getinfo/swiasi-android-s5-top`,
    headers: {
        Authorization: 'Bearer ' + API_TOKEN
    }
})
    .then((response) => {
        console.log(response.status, response.statusText, JSON.stringify(response.data, null, ' '))
    })
    .catch((e) => {
        console.info('exception', e.message)
    })

Valid response: 200 Ok Invalid response: 500 Exception

200 OK {
 "status": "success",
 "data": {
  "slug": "swiasi-android-s5-top",
  "name": "Samsung Galaxy S5 Top View",
  "fields": [
   {
    "id": 2,
    "width": 161,
    "height": 287
   }
  ]
 }
}