Obtaining access token
Introduction
- The Remote API uses a bearer token for Authentication and Authorization.
- The prefix of the access token changes according to the environment they are created for.
- If the prefix is
ra_live
, the access token are for production use, whilera_test
access tokens work only in our sandbox environment.
ℹ️ Note that only company admin or company owner can create and revoke the API token.
Create your access token
- On Remote dashboard, go to Company -> Company Settings -> Workflows and Integrations -> Integrations.
- Click on the Remote API card.
- Click on either the Generate API token button.
- A popup will open to ask you for the API token name.
In order to generate the access token, you also have to agree with the Remote API Terms of Use. - After creating an API token, you will see a table with all the tokens linked to the company, including the new active access token you just created.
Revoke access token
- Access the Integrations page. The screen should show a list of all your revoked access tokens and your active access token.
- Against the token you want to revoke, click on the three dots. This opens a menu with the option to
Copy token
andRevoke token
. - Click on the
Revoke token
option. A popup will appear asking you if you are sure to revoke the token. Click on the Revoke token button and it's done.
Performing an authenticated request
Remote tokens have two prefixes.
- Tokens starting with
ra_live_
are meant for production use. It means they only work against thehttps://gateway.remote.com/
server. - Tokens starting with
ra_test_
work only in our sandbox environment, which is accessible byhttps://gateway.remote-sandbox.com/
.
With the token in hand, you can send a request to the Remote API and pass the token in the Authorization
header.
curl --location --request GET \
--header "Authorization: Bearer ra_live_32adf..." \
--header "Content-Type: application/json" \
https://gateway.remote.com/v1/employments
Updated 2 days ago