Enable API Access

Go to the integration page at the Partner level and enable it.

Screen Shot 2022-09-09 at 1.33.47 PM.png

That’s it!

Take note of your client_secret. After you leave this page or refresh you will no longer be able to see this secret and you will need to rotate your secret to get a new one. See the “Handling Secrets (Security) section of the “Phin API Documentation” page for more.

Phin API Documentation

Get an Access Token

Use the client_id and client_secret from the Phin API Integration page to get an access token

The access token has a lifetime of 24 hours. After 24 hours (shown by the “expires_in” field of the response, measured in seconds) have elapsed, you will need to get a new access token.

Below is an example request and response:

request

curl --request POST \\
  --url <https://phin.us.auth0.com/oauth/token> \\
  --header 'content-type: application/json' \\
  --data '{"client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET", "audience":"<https://public.api.phinsec.io>","grant_type":"client_credentials"}'