There are several links found on Hosted Login screens by default. Most of them are used for navigating the user between Hosted Login screens, and are immediately functional. For example, the Forgot Password? link on the Sign In screen.
Others are used to link out to a page on your own site, and are NOT functional until you add your custom link value to them. For example, the Visit our help center link on the Sign In screen:
There are three (3) links by default which you can customize to point to a page on your site:
Link Name | Screen(s) | Description |
---|---|---|
linkHelp |
All screens | Link to Visit our help center. (pictured above) |
linkPrivacyPolicy |
Registration and re-acceptance screens | Link to your privacy policy (pictured below) |
linkTermsOfService |
Registration and re-acceptance screens | Link to your terms of service (pictured below) |
To configure your custom link values, follow the steps below.
In this section, you’ll make RESTful API calls to the Identity Cloud using your platform or language of choice. We provide complete sample calls in cURL format.
We recommend using a platform called Postman - a downloadable application for making API calls easily. You can download Postman here.
In this guide, we use your inputs to generate the calls for you in cURL format, which you can import into Postman:
First pick the link you want to configure from the table above. You can also view your current links by making an API call to the /links
endpoint using the GET method.
This call requires Basic Authorization. To create the authorization code for this call, your application owner Client Id
and Secret
must be combined with a colon in between (id:secret) and then base64 encoded.
You can find the application owner Client Id and Secret in the Identity Cloud Console:
Client Id
and Secret
in the Credentials section. Click the copy icon to left of each to quickly copy and paste them where needed.
Postman will create the authorization code for you. All you need to do is:
Client Id
as the Username and Secret
as the Password
When you Send the call, Postman will generate the Authorization header for you, and this will override the Authorization template from the imported call.
curl -X GET \
https://v1.api.REGION.janrain.com/config/APPLICATION_ID/flows/standard/links \
-H 'Authorization: Basic AUTHORIZATION CODE'
Below, enter the Link Name from the table above OR the link name
from your call’s response. We’ll use this in the next step.
Now that you’ve identified your link, you can use it in the following Registration Flow configuration calls for configuring the link URL, or elementHref
.
These calls require the exact same Basic Authorization header as the previous call.
Call the /links/<linkName>
endpoint with the GET method to get your link configuration. This configuration includes the URL, or elementHref
, which is set to "#"
by default.
curl -X GET \
https://v1.api.REGION.janrain.com/config/APPLICATION_ID/flows/standard/links/LINK_NAME \
-H 'Authorization: Basic AUTHORIZATION CODE'
Copy the full JSON object from the response and paste it into the text box below. Then replace the default elementHref
value with your link URL.
{
"elementHref": "https://mydomain.com/help",
"elementText": {
"key": "12ed346de096c8dd8f5407ad1aa4aaa6",
"path": "fields.linkHelp.elementText",
"values": {
"en-US": "Visit our help center."
}
},
"name": "linkHelp"
}
Tips!
_self
attributes are not configurable and can be safely removed from the JSON for simplicity, as in the example above.elementText.values
object of the link configuration.To update the configuration in the Registration Flow, call the same endpoint with the PUT method, passing the full, updated JSON object in the body of the call.
curl -X PUT \
https://v1.api.REGION.janrain.com/config/APPLICATION_ID/flows/standard/links/LINK_NAME \
-H 'Authorization: Basic AUTHORIZATION CODE' \
-H 'Content-Type: application/json' \
-d 'MY UPDATED LINK CONFIGURATION'
Your call is successful if the Response Body is empty and Status: 204 No Content
.
NOT SEEING YOUR CHANGE? By default, you have a Global Setting called default_flow_version which is set to HEAD
. This allows changes to the flow configuration - like this link change - to be published to Hosted Login screens immediately.
If default_flow_version is set to a specific flow version (example: 20200324202112729271
), you will need to update it to the new version in order to publish this change. You can find the latest flow version on the REGISTRATION BUILDER home page in Console.