Please get in touch
If you would like access to our staging environment to begin interacting with our APIs, please get in touch with your implementation manager, or at [email protected] so we can provide you with API credentials
YouLend uses the Client Credentials flow from OAuth 2.0 to secure the API endpoints.
To request an access token for any of the APIs, perform a POST operation to one of the following endpoints:
Location | Staging URL | Production URL |
---|---|---|
Europe | https://youlend-stag.eu.auth0.com/oauth/token | https://youlend.eu.auth0.com/oauth/token |
USA | https://youlend-stag.eu.auth0.com/oauth/token | https://youlend-us.us.auth0.com/oauth/token |
The payload of the request should be in the following format:
curl --request POST \
--url 'https://youlend-stag.eu.auth0.com/oauth/token' \
--header 'content-type: application/json' \
--data grant_type=client_credentials \
--data client_id=YOUR_CLIENT_ID \
--data client_secret=YOUR_CLIENT_SECRET \
--data audience=API_IDENTIFIER
The data audience
is relating to the identifier of the API you want to interact with.
Europe audience URLs
Identifier | Staging audience URL | Production audience URL |
---|---|---|
Onboarding | https://staging.youlendapi.com/onboarding | https://youlendapi.com/onboarding |
Notification | https://staging.youlendapi.com/notification | https://youlendapi.com/notification |
Prequalification | https://staging.youlendapi.com/prequalification | https://youlendapi.com/prequalification |
Loan | https://staging.youlendapi.com/loan | https://youlendapi.com/loan |
Preapproval | https://staging.youlendapi.com/preapproval | https://youlendapi.com/preapproval |
USA audience URLs
Identifier | Staging audience URL | Production audience URL |
---|---|---|
Onboarding | https://staging.youlendapi.com/onboarding | https://youlendapi.us/onboarding |
Notification | https://staging.youlendapi.com/notification | https://youlendapi.us/notification |
Prequalification | https://staging.youlendapi.com/prequalification | https://youlendapi.us/prequalification |
Loan | https://staging.youlendapi.com/loan | https://youlendapi.us/loan |
Preapproval | https://staging.youlendapi.com/preapproval | https://youlendapi.us/preapproval |
The successful response (200
) contains a signed JSON Web Token (JWT), the token's type (which is Bearer), and in how much time it expires in Unix time (86400 seconds, which means 24 hours).
{
"access_token":"eyJz93a...k4laUWw",
"token_type":"Bearer",
"expires_in":86400
}
Be aware
Tokens are valid for 24 hours. Please wherever possible store a token each day and re-use it instead of requesting multiple tokens per day. You can use the
expires in
property to help you manage this
Your application must pass the retrieved Access Token
as a Bearer token in the Authorisation header of all API requests. For example:
curl -X POST "https://partners.staging-youlendapi.com/onboarding/leads"
-H 'authorization: Bearer ACCESS_TOKEN' \
-H "accept: application/json"
-H "Content-Type: application/json"
-d "REQUEST_DATA"
Try it out
You can also add the bearer token for an API directly in the API reference for each endpoint next to the 'Try it' button to try the operations without leaving this site