API for developers

Presentation of API

Requirements

  • A valid URLR. account (with verified email)
  • A paid subscription that gives access to API
  • Any language you can make an HTTP request with

Step 1 / Login

URL

https://en.urlr.me/api/login_check

Method

POST

Headers

Content-Type: application/json

Data

{
    "username": "johndoe",
    "password": "test"
}

If your credentials are valid, you'll get a token valid for one hour. Keep it for next steps.

Step 2 / Reduce a link

URL

https://en.urlr.me/api/reduce-link

Method

POST

Headers

Content-Type: application/json
Authorization: Bearer {TOKEN}

Data

{
    "url": "{URL}",
    "team": "{TEAM_ID}",
    "folder": "{FOLDER_ID}"
}
  • {TOKEN}: Replace it with the token given at step 1.
  • {URL}: Replace it with your URL to reduce.
  • {TEAM_ID}: Optional. Replace it with your team ID (you can find it in your dashboard).
  • {FOLDER_ID}: Optional. Replace it with your team ID (you can find it in your dashboard).

Step 3 / Read the result

Success

200 code

{"code": 200, "url_code": "YQ8hv"}

You can now use your reduced url like this: https://en.urlr.me/{url_code}

Error

400 code

{"code": 400, "error": 0}

The error field can have several values:

  • -1: The API is only available for accounts with subscriptions, provided the email address is verified.
  • 0: The URL is not valid. Please verify.
  • 1: This URL is considered as spam. Please contact us if you believe this is an error.
  • 2: You have reached the reduced links hourly limit with your subscription.
  • 3: The creator of the team did not renew their subscription.

401 code

{"code": 401, "message": "JWT Token not found"}

Verify your credentials and/or that you have provided a valid token.

Step 2 / Get stats of a link

URL

https://en.urlr.me/api/stats/{code}

Method

GET

Headers

Authorization: Bearer {TOKEN}
  • {CODE}: Replace it with your URL code composed of 5 random characters.
  • {TOKEN}: Replace it with the token given at step 1.

Step 3 / Read the result

Success

200 code

{"code": 200, "views": "150"}

Error

400 code

{"code": 400, "error": 0}

The error field can have several values:

  • -1: The API is only available for accounts with subscriptions, provided the email address is verified.
  • 0: this link doesn't exists
  • 1: this link doesn't belong to you

401 code

{"code": 401, "message": "JWT Token not found"}

Verify your credentials and/or that you have provided a valid token.

Step 2 / Get limits of account

URL

https://en.urlr.me/api/limits

Method

GET

Headers

Authorization: Bearer {TOKEN}
  • {TOKEN}: Replace it with the token given at step 1.

Step 3 / Read the result

Success

200 code

{
    "code": 200,
    "createdTeamHourMeter": 0,
    "createdTeamHourLimit": 500,
    "joinedTeamHourMeter": 11,
    "joinedTeamHourLimit": 2500,
    "personalHourMeter": 1,
    "personalHourLimit": 100
}

Error

400 code

{"code": 400, "error": 0}

The error field can have only one value:

  • -1: The API is only available for accounts with subscriptions, provided the email address is verified.

401 code

{"code": 401, "message": "JWT Token not found"}

Verify your credentials and/or that you have provided a valid token.

We use optional third-party analytics cookies to obtain visit statistics.
Learn more

Reject Accept