Rippling integrations rely on OAuth 2.0, in which Rippling is the server and your application is the client. At a high-level, Rippling will send the user to your redirect URL with a ?code=<xxx> parameter when they install your application in Rippling. This provides the authorization that your application will utilize to exchange for access and refresh tokens.Requirements#
To understand the installation flow requirements expected from apps in the Rippling App Shop, please navigate to Partner Requirements.The Installation Flow#
To begin, navigate to your Login URL and then navigate to your App Shop Listing URL as your app will not yet be discoverable from the App Shop.Please use the following URLs for your appsRippling-Initiated App Installation Flow Diagram#
Partner-Initiated App Installation Flow Diagram#
Initial Redirect#
As you go through the setup flow, you will be redirected to the redirect URL that you configured in the Default Redirect URL field in your app listing. The following query parameters will be present in the redirect.| Redirect Query Parameter | Description |
|---|
| code | OAuth code that can be exchanged for an access token. |
| buy | A boolean value based on whether the user indicated they are purchasing a new account, or connecting an existing account. |
| redirect_uri | The URL on Rippling that the user should be sent back to once the OAuth setup is done. |
Please note: Rippling will only use redirect URIs that have already been configured in your app. Rippling will not redirect to any URL that is passed as a parameter unless it is also configured as an additional redirect URL within the app listing.
Using the code value, your server will be able to get an access token from Rippling.NOTE: Once the user has been redirected from Rippling to your application, the authorization code is valid for 300 seconds. The authorization code must be used to redeem an access token within 300 seconds of the code being issued. If an access token is not redeemed with this authorization code by then, the user will need to Redirect from Rippling again.Rippling will redirect to your redirect URL with an authorization code. The redirect will look like this:https://oauth.pstmn.io/v1/callback?code=kThqQg24SmDr3Z3XV6oo2CgpC03ysS2M&redirect_uri=https%3A%2F%2Fapp.rippling.com%2Fapps%2FPLATFORM%2FPortalTest%2Freturn&buy=false
The redirect_uri is the URL that you must return the user to in Rippling to complete the app installation flow.If you need to quickly get another authorization code with your test company, you can go directly to the Redirect URL for your app (replace INSERTAPPNAME with your app name) and then click the Continue button:https://app.rippling.com/apps/PLATFORM/INSERTAPPNAME/redirect
Retrieving an Access Token#
To retrieve the access token, your server will need to make a POST to the API Token URL. The POST should include a basic auth header with base64 encoded <clientid>:<clientsecret>, along with the following parameters.| Auth Query Parameters | Description |
|---|
| grant_type | authorization_code |
| code | OAuth code that was sent in the redirect |
| redirect_uri | Your redirect URL. This must match the redirect URL you had provided to Rippling |
When the user is redirected from Rippling to your app, that user should then sign in to the app. This allows you to identify the account and associate the code with their account. The redirect URL that you receive from Rippling is where you should redirect the user back to following the user signing into the application.
Here is an access token sample request:The REDACTED should be replaced with Base64 encoding of the "{client_id}:{client_secret}" string in the request header.The INSERTAUTHORIZATIONCODE should be replaced with the authorization (OAuth) code that Rippling returns in the code parameter the redirect from Rippling to your applicationThe https://example.com should be replaced with your redirect URL that has already been configured in your Rippling app.Here is an access token sample response:{
"access_token": "REDACTED",
"token_type": "Bearer",
"expires_in": 129600,
"refresh_token": "REDACTED",
"scope": "employee:workEmail employee:name"
}
When you receive an access token from Rippling, the payload will also include an expires_in output. The expires_in value is based in seconds and informs you of when your access token will expire. For example, if your access token response includes expires_in: 129600 then this means the access token you received has a duration of 129,600 seconds.Access tokens grant access to Rippling APIs for each company. One Access Token will give access to one Rippling Company. So if twelve Rippling companies have installed your app, then twelve Access Tokens will need to be used.Refresh Tokens#
To retrieve a Refresh Token, send a POST request to the same API Token URL with basic auth and your client ID and secret and the following form parameters.| Refresh Query Parameters | Description |
|---|
| grant_type | refresh_token |
| refresh_token | Refresh token from the initial grant |
Here is an example refresh token requestThe REDACTED should be replaced with Base64 encoding of the "{client_id}:{client_secret}" string in the request header.The INSERTFREFRESHTOKEN should be replaced with your existing refresh token.Linking the OAuth tokens with the Rippling Company#
Now that the connection has been made, your server should request the company information. This information can then be matched with your application's internal database so that you can link the tokens with the corresponding Rippling Company.Current Company#
Retrieve the current company's information with the GET companies/current endpoint. Note, the fields returned will depend on the scopes the customer has authorized your service to access.FAQs#
Do authorization codes expire?#
Yes, authorization codes expire after 300 seconds.Can authorization codes from installs be used more than once?#
No, authorization codes can only be used a single time.Do I have to retrieve an access token within 300 seconds of receiving the authorization code?#
Yes, your integration needs to retrieve an access token within 300 seconds of receiving the authorization code.What do I do if I miss the window to retrieve an access token with my authorization code?#
Go back to your installation in Rippling. You can pick up where you left off in the installation flow. Click the Redirect button again on the Redirect installation flow screen. This will generate a new authorization code.Do access tokens expire?#
Yes, access tokens will expire.How long are access tokens valid for?#
Use the expired_in output as part of the response from the token endpoint to tell how long the access token is valid for. It is important that your integration uses the seconds populated in the expired_in output to understand when an access token will expire.When will my access token expire?#
The lifetime of access tokens can be read during the initial retrieval of the access tokens. Third-party applications are responsible for tracking the expiration of their tokens and using refresh tokens to retrieve new access tokens once their access tokens expire.Yes, they can. Once you have an access token, you can use it to call any of the API endpoints your app is scoped for.Do refresh tokens expire?#
No, refresh tokens don't expire. Once a refresh token is used to retrieve another access token, that refresh token will be revoked. Refresh tokens are revoked once they are used.The access token and refresh token have been revoked for a customer app install. How should we resolve this?#
The only way fix this issue is for the customer to uninstall and reinstall your app in Rippling. In doing so, the customer will be redirected to your configured redirect URL in your app with a new authorization code. You can then use that authorization code and redeem it for a new access and refresh token pair. The only way to fetch a new token pair is by asking the admin of your customer to complete the app installation flow again in their Rippling company.Can refresh tokens be used more than once?#
No, refresh tokens can only be used once. However, refresh tokens have a 36 hour grace period after their first usage in which applications can reuse them to retrieve a new set of access and refresh tokens. Refresh tokens can only be used once because their usage should result in an additional access token and refresh token. Refresh tokens allows clients to continue to have a valid access token without further interaction with the user.No, current installs will need to reauthorize the app in order to grant the app access to the new scopes. For example, if you have three customers with active app installations, each of these customers will need to reauthorize and consent to the scopes now available in the app.To reauthorize, admins must be directed to the Authorize installation step of their app's installation flow. The template URL for this step is: https://app.rippling.com/apps/PLATFORM/{APPNAME}/authorize. Once their the admins would then proceed through the rest of the installation flow and finish the installation.Additionally, the customer can also reauthorize by uninstalling the existing app completely and reinstalling the app from scratch. The admin can uninstall the existing app by going to the the app in Rippling > Settings > Uninstall.For more information on redirect URLs and common questions surrounding this, please see Redirect URLs.How do we know when our app has been uninstalled by a customer?#
Rippling will send a company.deleted event when a Rippling customer has uninstalled your app. The webhook will look like this:event_name=company.deleted&id=583fd8803bf207cab80269b9&company_id=583fd8803bf207cab80269b9&company_primary_email=huroncompany%2Bfake%40rippling.com
Additionally, any endpoint will return a 403 error code with a response of:{
"detail": "The token has been revoked"
}If you're a partner seeking answers or encountering difficulties while integrating with Rippling, please contact us at partner.support@rippling.com. Ensure our responses reach you by preventing emails from this address from being filtered into your spam folder.