---
updatedAt: 2026-04-20T19:30:58.000Z
---

# Create a login policy

[block:html]
{
  "html": "<div>\n<video width=\"600\" height=\"400\" controls poster=\"https://techdocs.akamai.com/identity-cloud/videos/posters/create-a-login-client.png\">\n  <source src=\" https://techdocs.akamai.com/identity-cloud/videos/create-a-login-client.mp4\" type=\"video/mp4\">\n  <strong>Error</strong>: The video's URL was inaccessible.\n</video>\n<p><strong>Creating an OIDC Login Client</strong></p>\n</div>"
}
[/block]

<br>

Call the [/config/loginPolicies](https://techdocs.akamai.com/identity-cloud-hosted-login/reference/post-login-policy) operation using the **POST** method to create a login policy for your Hosted Login implementation.

By default, ​Akamai​ issues you a single login policy, a policy used by both your public client and your confidential client. And that’s fine: the same login policy can be used by multiple OIDC clients. In fact, you might be able to get by with a single login policy. So then why would you need to create additional policies? Well, for one thing, you might want to return [custom claims](https://techdocs.akamai.com/identity-cloud/docs/scopes-and-claims) for some of your users but not for *all* of your users. Because custom claims information is defined in login policies, different claim sets might require different policies. Likewise, you might want to direct different users to different login pages: the location of the login page is specified in the login policy (the **loginURL** property).

When configuring Bearer token authorization for this call, use the configuration token you provisioned in [Get an administrative access token](https://techdocs.akamai.com/identity-cloud/docs/get-an-administrative-access-token-needed-to-call-the-hosted-login-apis).

<br>

# Request template

[block:code]
{
  "codes": [
    {
      "code": "curl -X POST \\\nhttps://v1.api.<region>.janrain.com/<customer-id>/config/loginPolicies \\\n  -H 'Authorization: Bearer <token> \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"identityStoreDetails\": {\n    \"connectionDetails\": {\n      \"applicationId\": \"<capture-app-id>\",\n      \"clientId\": \"<capture-app-owner-client-id>\",\n      \"clientSecret\": \"<capture-app-owner-client-secret>\",\n      \"domain\": \"<provided-by-akamai>\",\n      \"entityType\": \"<entity-type>\"\n    },\n    \"type\": \"janrainCapture\"\n  },\n  \"loginURL\": \"https://v1.api.<region>.janrain.com/<customer-id>/auth-ui/login\",\n  \"title\": \"<new-login-policy-name>\"\n}'",
      "language": "curl"
    }
  ]
}
[/block]

<br>

# Example request

[block:code]
{
  "codes": [
    {
      "code": "curl -X POST \\\nhttps://v1.api.us.janrain.com/12345678-1234-1234-1234-123456789012/config/loginPolicies \\\n  -H 'Authorization: Bearer 123abc456...def789ghi' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"identityStoreDetails\": {\n    \"connectionDetails\": {\n      \"applicationId\": \"1abcdef2g3hijklmno4pqrs5tu\",\n      \"clientId\": \"abc123defg4h5i67jklmnopqrstuvw89\",\n      \"clientSecret\": \"12a34bc5d67ef8ghij9klmn01o2pqrst\",\n      \"domain\": \"dev-app.janraincapture.com\",\n      \"entityType\": \"user\"\n    },\n    \"type\": \"janrainCapture\"\n  },\n  \"loginURL\": \"https://v1.api.us.janrain.com/12345678-1234-1234-1234-123456789012/auth-ui/login\",\n  \"title\": \"Property 1 Login Policy\"\n}'",
      "language": "curl"
    }
  ]
}
[/block]

<br>

# Example response

[block:code]
{
  "codes": [
    {
      "code": "\"1ab23c45-6789-0123-d4ef-5g678h90ijk1\"",
      "language": "http"
    }
  ]
}
[/block]

The response contains the ID of the login policy you just created. If you want to review the full login policy you just created, call the [/config/loginPolicies/{loginPolicyId}](https://techdocs.akamai.com/identity-cloud-hosted-login/reference/get-login-policy) operation using the GET method.

# Sibling pages

* [Verify components](https://techdocs.akamai.com/identity-cloud/docs/verify-the-hosted-login-components-provided-by-akamai.md)
* [Get an administrative access token](https://techdocs.akamai.com/identity-cloud/docs/get-an-administrative-access-token-needed-to-call-the-hosted-login-apis.md)
* [Create a token policy](https://techdocs.akamai.com/identity-cloud/docs/create-a-token-policy-optional.md)
* [Create or modify a login client](https://techdocs.akamai.com/identity-cloud/docs/create-a-login-client-or-modify-your-current-login-client.md)
* [Configure application client settings](https://techdocs.akamai.com/identity-cloud/docs/configure-the-required-application-client-settings.md)
* [Make an authorization request](https://techdocs.akamai.com/identity-cloud/docs/call-hosted-login-from-your-site-or-app.md)
* [Configure CNAMEs](https://techdocs.akamai.com/identity-cloud/docs/configure-cnames-optional.md)
* [Redirect Hosted Login links](https://techdocs.akamai.com/identity-cloud/docs/redirect-your-hosted-login-links.md)
* [Configure social login](https://techdocs.akamai.com/identity-cloud/docs/configure-social-login-optional.md)
* [Next steps](https://techdocs.akamai.com/identity-cloud/docs/hosted-login-provisioning-next-steps-1.md)