MFA problem in Api end point /api/auth/authn/verify

57 views
Skip to first unread message

Mohit Madaan

unread,
Nov 9, 2018, 12:21:13 PM11/9/18
to Developer Group for QPP APIs
Hello All,

We are trying to fetch the key from CMS and follwing the same steps as we received in the email from CMS. But in the step 2 of verify MFA along with Bearer-Interim token, we are getting BAD request. Below is the complete detail of request and response we are getting.

Could any body send me the reason what exactly wrong I am doing.

Step 1: API end point : https://qpp.cms.gov/api/auth/authn

Header Values:

[{"key":"Content-Type","value":"application/json","description":""}]
[{"key":"Accept","value":"application/vnd.qpp.cms.gov.v1+json","description":""}]

Body:
{
  "password": "**********",
  "username": "username"
}



Response:

{ "message": "Password accepted, MFA request sent", "data": { "factors": [ { "id": "a9d156b57eb1f56d6ed13dfXXXXXXXXXXXXXX2402cfa3377663602978", "type": "sms", "profile": { "phoneNumber": "+1 XXX-XXX-9999" } } ], "activeFactor": { "id": "a9d156b57eb1f56d6XXXXXXXXXXXXXXXXXXXXXXx77663602978", "type": "sms", "profile": { "phoneNumber": "+1 XXX-XXX-9999" } } }, "auth": { "type": "Bearer-Interim", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXzZXJJZCI6IjAwdXQ4NnZkMFlWMG1SY2l", "text": "Bearer-Interim eyJhbGciOiJIUzI1NiIsInR5cCI6IkNnZkMFlWMG1SY2llMjk" }, "loginStatus": "MFA_CHALLENGE" }



Step 2: Now after getting the step 1 verified and based on the response values we are sending request to below endpoint:


Accept: application/vnd.qpp.cms.gov.v1+json
Content-Type: application/json
Authorization: Bearer-Interim eyJhbGciOiJIUzI1NiIsInR5cCI6IkNnZkMFlWMG1SY2llMjk

Body:

{ "factorId": "a9d156b57eb1f56d6ed13dfXXXXXXXXXXXXXX2402cfa3377663602978", "verificationCode": 479696 }

Response from CMS:

{ "error": { "errorId": "345574b0-ddda-403b-9dd2-a5XXXX5c5b", "type": "UnknownError", "code": 400, "message": "_.get(...).trim is not a function", "details": {}, "causeMsg": "_.get(...).trim is not a function" } }



Now in the step 2 we are getting the above error.

Could any body please let me know what step I am missing in the authentication process.

Thank you,
Mohit

Jonathan Keller

unread,
Nov 9, 2018, 4:08:10 PM11/9/18
to Developer Group for QPP APIs
I had the same problem and by putting the verificationCode in quotes fixed the problem.

"verificationCode": "123456"

Mohit Madaan

unread,
Nov 12, 2018, 10:13:51 AM11/12/18
to Developer Group for QPP APIs
Thank you very much for the solution.

Mohit
Reply all
Reply to author
Forward
0 new messages