Access Token

An Access Token is a vital entity that allows secure interaction with the API to create orders. It acts as a secure key, enabling authenticated access for performing operations, ensuring that only authorized users can create orders.

Creating an access token

GET /api/v1/oauth/token?

Creates a new access token.

Query Parameters


{
    "access_token": "eyJhbGciOiJ.............1ZjhiOTEzMWUzY2Q5ZGUwZWNkYzIyNTkyIiwiZXhwIjovPqSQ",
    "expires_in": 7200,
    "token_type": "Bearer"
}

Usage

Once obtained, the Access Token should be included in the Authorization header when creating orders:

Authorization: Bearer YOUR_ACCESS_TOKEN

Security:

Treat the Access Token as sensitive information. Never expose it in client-side code or share it publicly. Regenerate the token immediately if it's compromised.

Lifetime:

Access tokens have a limited lifetime. Please refer to the token’s expiry in the response and request a new token as necessary.

Example Request:

GET https://api.rampnow.io/api/v1/oauth/token?grant_type=client_credentials&client_id=12345&client_secret=<your_api_key_here>

Example Response:

 {
    "access_token": "eyJhbGciOiJ.............1ZjhiOTEzMWUzY2Q5ZGUwZWNkYzIyNTkyIiwiZXhwIjovPqSQ",
    "expires_in": 7200,
    "token_type": "Bearer"
}

Conclusion:

Acquiring an Access Token is a prerequisite for creating orders within the RampNow system. It ensures secure and authenticated interactions with the API, allowing for the creation of orders by validated users.

Last updated