User Registration API Documentation

Step 1: Check Nickname Availability

Check Nickname Availability

The /checkNickname endpoint allows you to verify if a nickname is already in use within the system.

Request Details

  • URL: POST https://ex.pankek.io/checkNickname
  • Headers:
    • Content-Type: application/json
    • api-key: <YOUR_API_KEY>
  • Body:
  • {
      "value": "testNickname"
    }
    • value: The nickname to check (string, required).

Response

Successful Response (Nickname is available):

{
  "result": "OK"
}

Error Response (Nickname is taken):

{
  "result": "This username is already taken."
}

Example Code

const axios = require('axios');

axios.post('https://ex.pankek.io/checkNickname', {
  value: 'testNickname'
}, {
  headers: {
    'Content-Type': 'application/json',
    'api-key': '3959798b-38d8-4d02-915d-a79825bc3a7b'
  }
})
.then(response => {
  const result = response.data.result;
  if (result === 'OK') {
    console.log('Nickname is available.');
  } else {
    console.error('Error:', result);
  }
})
.catch(error => console.error('API Error:', error));

Navigation