# DuoCallback through API

**URL:** <https://devforum.okta.com/t/duocallback-through-api/8304>\
**Category:** API\
**Created:** [March 2, 2020, 1:40pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304 "2020-03-02T13:40:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielffm](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danielffm](https://devforum.okta.com/u/danielffm)\
**Post date:** [March 2, 2020, 1:40pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304/1 "2020-03-02T13:40:50Z")

</div>

Hi there,

hope you are doing well.I want to login with OKTA into the salesforce system of my customer.

Within python I have implemented the OKTA-Rest-API.

My python code (missing some first lines with passwords and stuff…)

> auth\_url = ‘[https://appdynamics.okta.com/api/v1/authn](https://appdynamics.okta.com/api/v1/authn)’
> 
> #Authorize against okta  
> response = post(auth\_url, dataList, headerList)  
> dataList[‘stateToken’] = response[‘stateToken’]  
> dataList[‘id’] = response[‘\_embedded’][‘factors’][0][‘id’]  
> verify\_url = response[‘\_embedded’][‘factors’][0][‘\_links’][‘verify’][‘href’]
> 
> response = post(verify\_url, dataList, headerList)  
> duoCallback\_url = response[‘\_embedded’][‘factor’][‘\_embedded’][‘verification’][‘\_links’][‘complete’][‘href’]  
> signature = response[‘\_embedded’][‘factor’][‘\_embedded’][‘verification’][‘signature’]  
> dataList[‘sig\_response’] = signature

> pp.pprint(dataList)  
> #Triggers a phone call  
> response = post(duoCallback\_url, dataList, headerList)  
> pp.pprint(response)

It will produce this output:

> called URL: [https://MYDOMAIN.okta.com/api/v1/authn](https://MYDOMAIN.okta.com/api/v1/authn)  
> called URL: [https://MYDOMAIN.okta.com/api/v1/authn/factors/REALFACTORID/verify](https://MYDOMAIN.okta.com/api/v1/authn/factors/REALFACTORID/verify)  
> { ‘id’: ‘some-real-id’,  
> ‘password’: ‘someCorrectPassword’,  
> ‘sig\_response’: ‘someRealSigResponse’,  
> ‘stateToken’: ‘someRealToken’,  
> ‘username’: ‘daniel.ross@appdynamics.com’}  
> called URL: [https://MYDOMAIN.okta.com/api/v1/authn/factors/REALFACTORID/lifecycle/duoCallback](https://MYDOMAIN.okta.com/api/v1/authn/factors/REALFACTORID/lifecycle/duoCallback)  
> { ‘errorCauses’: ,  
> ‘errorCode’: ‘E0000028’,  
> ‘errorId’: ‘oaeUCPbNM05TKiO7gjaB91SmQ’,  
> ‘errorLink’: ‘E0000028’,  
> ‘errorSummary’: ‘The request is missing a required parameter.’}

I have used chrome dev tools to find the parameters which are nessesary for /duoCallBack. However having sig\_response, stateToken and the ID in the request is not working…

Do you have any idea what I am doing wrong? I was expecting to get a call on my phone to confirm - but I didn’t.

Any tips appreciated 🙂

Best,  
Daniel

---

<div class="post-metadata">

**Author:** ![danielffm](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danielffm](https://devforum.okta.com/u/danielffm)\
**Post date:** [March 3, 2020, 1:12pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304/2 "2020-03-03T13:12:38Z")

</div>

Does anyone has an idea / hint for me? 🙂

---

<div class="post-metadata">

**Author:** ![christina.rogers](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@christina.rogers](https://devforum.okta.com/u/christina.rogers)\
**Post date:** [September 26, 2022, 9:26pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304/3 "2022-09-26T21:26:52Z")

</div>

Did you ever figure out what the required parameters were for this?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [October 5, 2022, 9:23pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304/4 "2022-10-05T21:23:55Z")

</div>

You might want to check out our documentation for /authn, which talks about the iframe you would need to use to complete verification for Duo: [Authentication | Okta Developer](https://developer.okta.com/docs/reference/api/authn/#verify-duo-factor)

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 10:09pm UTC](https://devforum.okta.com/t/duocallback-through-api/8304/5 "2024-02-12T22:09:44Z")

</div>


