List Your Custom Providers

Endpoint URL: /config/low/services/engage-v2 /apps/{appId}/custom-providers


Description

Unlike the predefined social login identity providers (Facebook, Twitter, Apple, etc.), custom providers don’t always appear in the Social Login Dashboard. (SAML providers will typically show up, but OpenID Connect and OAuth providers will not.) Because of that, the only guaranteed way to get information about the custom providers available for your use is to call the /config/low/services/engage-v2/apps/{appId}/custom-providers endpoint. Making an API call with this endpoint returns basic information about each of your custom providers, including the provider ID. This ID is required when you enable the custom provider for use in Hosted Login.

For example:

"id": "d284e861-d7f9-426e-93b0-56e01cf6d0ea",
"protocol": "saml2",
"title": "Akamai SAML",
"ui": {
    "title": "Akamai SAML",
    "icon_url": "https://dyzz9obi78pm5.cloudfront.net/app/image/id/5b749261ec161c506163b298/n/akamai-logo.svg"


URL Parameters

URL parameters that must be included in the request are listed in the following table:

Parameter

Description

customerId

Unique identifier issued to Akamai customers. If you aren’t sure what your Akamai customer ID is, log on to Console and check the value of the customer_id application setting:

appId

Unique identifier of your Social Login application. You can return the IDs of all your Social Login applications by using the GET method and the /engage-v2/apps endpoint.

No body parameters are required when calling this endpoint.


Authentication

This endpoint requires token-based authentication. To obtain an access token, you must use a configuration client (employing the client ID as the username and the client secret as the password) to connect to the /{customerId}/login/token endpoint. The access token returned from the token endpoint is then used in the Authorization header of your API call. 

For example, if you’re issued the access token z7S4iEe7KBRG8vMBPWRtJD66VH9SGMAlA56ol-loCln5MZOtGjmcy6O1tSh5lE6t your Authorization header will look like this when using Curl:

-H 'Authorization: Bearer z7S4iEe7KBRG8vMBPWRtJD66VH9SGMAlA56ol-loCln5MZOtGjmcy6O1tSh5lE6t'

If you’re using  Postman, set the Authorization Type to Bearer and use the access token as the value of the Token field:

Note. When requesting an access token, make sure you set the token scope to *:**. Any other scope will result in a 403 Forbidden error when you attempt to use the token.


Sample Request (curl)

The following command returns information about all the custom providers defined for use with the application fifbclhccfpjdeoejkag:

curl -L -X GET \
  'https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers' \
  -H 'Authorization: Bearer lCV4idO6TEGHfUYCAqvBKekYWYnGEB7xqDPgOZfwKrhSSWD6B787TpOaGEzxKEAc' 


Responses

200 OK

If your API call succeeds, you’ll get back basic information for each of the application’s custom providers. In the following output, the individual provider IDs are marked in red:

{
    "_embedded": {
        "item": [
            {
                "_links": {
                    "self": {
                        "href": "https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers/fefd3a77-7619-428a-8916-8b4e25ef2a5c"
                    }
                },
"id": "fefd3a77-7619-428a-8916-8b4e25ef2a5c",
                "protocol": "openidconnect",
                "title": "Spotify OIDC Provider",
                "ui": {
                    "title": "Spotify",
                    "icon_url": "https://developer.spotify.com/assets/branding-guidelines/icon1@2x.png"
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers/d284e861-d7f9-426e-93b0-56e01cf6d0ea"
                    }
                },
 "id": "d284e861-d7f9-426e-93b0-56e01cf6d0ea",
                "protocol": "saml2",
                "title": "Akamai SAML",
                "ui": {
                    "title": "Akamai SAML",
                    "icon_url”: "https://dyzz9obi78pm5.cloudfront.net/app/image/id/5b749261ec161c506163b298/n/mixi-logo.svg"
                },
            {
                "_links": {
                    "self": {
                        "href": "https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers/0dce70b3-4f71-4d74-993f-d9f02bde1025"
                    }
                },
     "id": "0dce70b3-4f71-4d74-993f-d9f02bde1025",
                "protocol": "oauth2",
                "title": "Yahoo! OAuth 2.0",
                "ui": {
                    "title": "Yahoo! OAuth 2.0",
                    "icon_url": "https://quilt-cdn.janrain.com/HEAD/icons/janrain-providers/yahoo.png"
                }
            },
            }
        ]
    },
    "_links": {
        "item": {
            "href": "https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers{/id}",
            "templated": true
        },
        "self": {
            "href": "https://v1.api.us.janrain.com/3cc14467-fd4f-437d-a0c0-0b3888dd2ee4/v2/config/low/services/engage-v2/apps/fifbclhccfpjdeoejkag/custom-providers"
        }
    },
    "total": 4
}


Error Response Codes

The following table includes information about some of the other response codes that you might encounter when calling this endpoint.

Response Code

Description

400

The request was invalid. Typically occurs because your URL is incorrect. Verify each section of the URL and then try again.

403

Forbidden. Access is denied. This typically occurs because your configuration access token has expired. Obtain a new access token and then try again.

404

The requested resource was not found. Typically occurs if your call specifies an invalid customer ID or application ID. Verify that those values are correct and then try again.