cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2375
Views
0
Helpful
2
Replies

Linux curl to Admin API for admin/v1/users

Hance
Level 1
Level 1

3 different methods/approaches, getting 3 different errors.

{“code”: 40101, “message”: “Missing request credentials”, “stat”: “FAIL”}

{“code”: 40104, “message”: “Missing request timestamp”, “stat”: “FAIL”}

{“code”: 40103, “message”: “Invalid signature in request credentials”, “stat”: “FAIL”}

Any idea which one is closer to getting through?

All I want is a simple user dump “admin/v1/users”. That’s it. That’s all I need. If you have a curl example that does this, I’d REALLY appreciate it.

2 Replies 2

DuoKristina
Cisco Employee
Cisco Employee

How are you constructing the HTTP basic authentication header for the curl request?

Duo, not DUO.

2 different 1 line scripts calling curl:

First one has login credentials straight up with a colon ( separator

#!/bin/sh

curl --request GET -H “Date: Tue, 26 Feb 2019 08:59:26 -0500” -H “Content-Type: application/x-www-form-urlencoded” -H “Authorization: Basic DIB4BV*********:pe3z8**************” https://api-5*******.duosecurity.com/admin/v1/users

Results:
{“code”: 40101, “message”: “Missing request credentials”, “stat”: “FAIL”}

This script has the login creds base 64’d

#!/bin/sh

curl --request GET -H “Content-Type: application/x-www-form-urlencoded” -H “Authorization: Basic RElCNEJWTlhXBase64***==” -H “Date: Tue, 26 Feb 2019 08:59:26 -0500” “https://api-5*********.duosecurity.com/admin/v1/users”

Results:

{“code”: 40103, “message”: “Invalid signature in request credentials”, “stat”: “FAIL”}

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links