Authentication

To authenticate when making API requests to the Rappi API, you require an Access Token.

The Rappi API uses a Bearer authentication scheme, as the HTTP authentication method for API requests.

To make API requests, send the token in a customer header to interact with protected resources.

Rappi uses the following scheme for the Bearer authentication:

KeyValue
x-authorizationBearer [access_token]

The following table describes the different contents of the Authentication resource:

ResourceDescription
POST tokenUse this endpoint to generate an Access Token. This token enables you to authenticate when making API requests

POST token

Use this endpoint to generate an access token. This token enables you to authenticate when making API requests.

Endpoint URL

Use the following URLs to make a request with this endpoint:

  • Development URL: https://rests-integrations-dev.auth0.com/oauth/token
  • Production URL: https://rests-integrations.auth0.com/oauth/token

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://rests-integrations-dev.auth0.com/oauth/token

This is an example of the request:

{ "client_id": "7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd", "client_secret": "40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW", "audience": "https://int-public-api-v2/api", "grant_type": "client_credentials" }
URL url = new URL("https://rests-integrations-dev.auth0.com/oauth/token"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setDoOutput(true); final String jsonInputString = "{\n" + " \"client_id\":\"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd\",\n" + " \"client_secret\":\"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW\",\n" + " \"audience\":\"https://int-public-api-v2/api\",\n" + " \"grant_type\":\"client_credentials\"\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
client_id
string
requiredClient Id of your Rappi Credentials.
client_secret
string
requiredClient Secret of your Rappi Credentials.
audience
string
requiredIdentifier of the Rappi API.
grant_type
string
requiredPermission to request.

Sample Response

This is an example of the response:

{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpeyJhbGciOiJIUzI1NiIsInR5cCI6IkpeyJhbGciOiJIUzI1NiIsInR5cCI6Ikp", "scope": "integration:health-check", "expires_in": 86400, "token_type": "Bearer" }

This table describes the objects contained in the response example:

Response ObjectObject Description
access_token<
string
Access token to access secure endpoints.
scope<
string
Scope granted.
expires_in<
integer
Token expiration time in seconds.
token_type<
string
Token type.