/config/{appId}/flows/{flow}/locales/{locale}/2faMessages

The /config/{appId}/flows/{flow}/locales/{locale}/2faMessages endpoint returns information (the name and the path) for each two-factor authentication (2FA) message found in the specified flow. You can only modify the text of a 2FA message if that message has been added to a flow. (The standard set of 2FA messages can be copied to a flow by calling the /config/{appId}/flows/{flow}/2faMessages endpoint.) If your API call returns a 404 Not Found error, that typically means that the no 2FA messages could be found in the flow.

Note. Due to a bug in the software, it’s possible that this endpoint will return a list of 2FA messages even if those messages aren’t actually in the flow. This bug will be fixed soon. Until then, you can use the /config/{appId}/flows/{flow}/locales/{locale}/2faMessages/{message} endpoint and the PUT method to return information about a specific 2FA message (for example, secondFactor). If that API call fails with a 404 Not Found error, that means that none of the 2FA messages are in the specified flow.


This endpoint supports the following methods:


  • GET


GET


Description


Returns information about the 2FA messages included in a flow.

URI Parameters


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


Parameter

Type

Required

Description

{appId}

string


Yes

Unique identifier of the Identity Cloud application associated with the 2FA messages.


{flow}

string

Yes

Name of the flow containing the 2FA messages. Note that flow names are case-sensitive: if your flow is named standard then an error occurs if you list the flow as, say,  Standard.


{locale}

string

Yes

Locale of the flow (e.g., en-US) containing the 2FA messages. Similar to flow names, locales are also case-sensitive.



Authentication


This endpoint requires Basic authentication. When configuring authentication, use your client ID as the username and your client secret as the password.


Sample Request (curl)


The following command returns information about the 2FA messages found in the standard flow:


curl -L -X GET \
  'https://v1.api.us.janrain.com/config/79y4mqf2rt3bxs378kw5479xdu/flows/standard/
locales/en-US/2faMessages' \ 
    -H 'Authorization: Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hr
N2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U='


Responses


200 OK


If your API call succeeds you’ll get back the name and path of each 2FA message included in the flow:


[
    {
        "_self": "/config/79y4mqf2rt3bxs378kw5479xdu/flows/standard/locales/en-US/
2faMessages/secondFactor",
        "name": "secondFactor"
    },
    {
        "_self": "/config/79y4mqf2rt3bxs378kw5479xdu/flows/standard/locales/en-US/
2faMessages/resendVerification",
        "name": "resendVerification"
    },
    {
        "_self": "/config/79y4mqf2rt3bxs378kw5479xdu/flows/standard/locales/en-US/
2faMessages/registrationVerification",
        "name": "registrationVerification"
    }
]


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

404

Not Found. Indicates that the 2FA messages have not been copied to the flow.