Last updated

๐Ÿ” API Authentication

To access Rankiteo's API, you need to authenticate your requests using the api-key token. This token-based authentication ensures secure access to our API resources.


๐Ÿ” Authentication Overview

The Rankiteo API requires each request to include an API key in the header. This key is used to identify and authorize the user making the request.

How to Obtain Your API Key

  1. Ask your administrator to create an API key to share with you.

  2. Sign up or log in to your Rankiteo account.

  3. Navigate to your profile page and go to the API section.

  4. Copy your unique api-key token.

    โš ๏ธ Keep your API key safe! Your API key is sensitive information. Do not share it with unauthorized persons or expose it in public repositories.


๐Ÿ”‘ Making an Authenticated Request

Include the api-key in the request headers to authenticate your API requests. Hereโ€™s a breakdown of how to structure your request.

Request Header

Header NameValue
apikeyYour API Key

Example

Hereโ€™s an example of how to make a GET request to the /monitor-getcompanyaccess endpoint using the apikey in the header:

curl -X GET "https://api.rankiteo.com/monitor-getcompanyaccess" \
  -H "apikey: YOUR_API_KEY"

Replace YOUR_API_KEY with your actual API key.


Sample Request in Python

If youโ€™re using Python with the requests library, your code might look like this:

import requests

url = "https://api.rankiteo.com/monitor-getcompanyaccess"
headers = {
    "apikey": "YOUR_API_KEY"
}

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

if response.status_code == 200:
    print("Success:", response.json())
else:
    print("Error:", response.status_code, response.json())

โš ๏ธ Common Errors

  • 401 Unauthorized: This error indicates that the api-key is missing, invalid, or has been deactivated.

    • Solution: Ensure youโ€™re using a valid and active API key in the request header.
  • 403 Forbidden: This error may occur if your account does not have the necessary permissions to access the requested resource.

    • Solution: Check your access permissions, or contact Rankiteo support for assistance.
  • 404 Not Found: This error occurs if the endpoint or route does not exist.

    • Solution: Verify the endpoint URL and try again.

๐Ÿ™‹ Need Help?

If you encounter any issues with authentication, feel free to reach out to our support team at support@rankiteo.com.


Securing access, protecting data โ€” Rankiteo API Authentication