Partners

You'll need to set up OAuth if you're building an integration with Yorlet that accesses other peoples' Yorlet data.

Create the OAuth link

https://app.yorlet.com/oauth/authorize?
response_type=code&client_id=YOUR_CLIENT_ID&scope=read_only

User connects their account

After the user clicks the link on your site, they'll be taken to Yorlet's website where they'll be prompted to allow or deny the connection to your application.

User is redirected

After the user connects their account to your application, they are redirected back to your site, to the URL supplied by the redirect_uri parameter.

We will include:

  • The code, which is the authorization code

  • The scope granted

https://example.com/connect?code={AUTHORIZATION_CODE}&scope=read_only

If an error occurred we will send an error response:

https://example.com/connect?
error=request_denied&error_message=The%20user%20denied%20your%20request

Exchange the authorization code for an access token

Assuming no error occurred, the last step is to use the provided code to make a POST request to our /oauth/token endpoint to fetch an access token for the user.

curl https://app.yorlet.com/oauth/token \
-d client_secret="{API_SECRET_KEY}" \
-d code="{AUTHORIZATION_CODE}" \
-d grant_type=authorization_code