Authentication

Authentication

 

To authenticate, send a POST request to the following endpoint:

POST https://api.realtyfeed.com/v1/auth/token

The request should include the following in the Request Body as x-www-form-urlencoded key/values:

Parameter

Description

Parameter

Description

client_id

The client ID provided by Realtyna

client_secret

The client secret provided by Realtyna

And also include the following in the Request Headers:

Parameter

Description

Parameter

Description

Content-Type

application/x-www-form-urlencoded

Accept-Encoding

gzip, deflate, br

Accept

*/*

Example:

curl --location 'https://api.realtyfeed.com/v1/auth/token' \ --header 'accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=1lus...' \ --data-urlencode 'client_secret=fu3ertj...'

If the authentication request is successful, you will receive a JSON response with the following values:

{ "access_token": "<access_token>", "expires_in": 86400, "token_type": "Bearer" }
  • access_token: This is the authorization token that needs to be passed in the Authorization header of API requests.

  • expires_in: The duration of validity for the token in seconds (currently set to 86400).

  • token_type: The type of token being returned (currently set to "Bearer").

Note: Access tokens expire after 24 hours.
Clients are responsible for tracking expiration (using the expires_in field).

Recommendation:

  • Refresh your token before it expires (e.g., at 23 hours).

  • If an API call fails due to 401 Unauthorized, refresh immediately.

Rate Limit: 1 request per second (RPS).

Invalid Credentials: Repeated authentication attempts with an invalid client_id or client_secret may result in temporary blocking or permanent suspension. Make sure your credentials are correct.

 

Need more help? See How to get Authentication code