cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1735
Views
0
Helpful
7
Replies

Unauthizied Error with Admin API GET to Users

chris.spak
Level 1
Level 1

Hi all,

I have hit a wall trying to get the admin api to allow my calls to the users endpoint to return data. I am getting a 401 “unauthorized” error but I just don’t see what I am doing wrong.

Here is a sample of call that my code produces.

{Method: GET, RequestUri: ‘https://■■■■■■■■■■■■■■■■■■■■■■■■■■■■/admin/v1/users’, Version: 1.1, Content: , Headers:
{
Date: Thu, 01 Jul 2021 18:00:53 GMT
Authorization: Basic RElHOEpRVVFHVzhUQlE2MDNPVUw6M■■■■■■■■■■■■■■■■■■■■2I0NjMxNWJiMzkxZWNjZmU3MGE4NGVkNg==
}}

Any suggestions would be appreciated.

1 Accepted Solution

Accepted Solutions

I figured it out. The admin-ikey was getting overwritten before the request was sent out.

View solution in original post

7 Replies 7

chris.spak
Level 1
Level 1

I was able to run a couple of requests in Postman and now I have a clearer understanding of the issue. This is the response I get from Dup in Postman

“Invalid signature in request credentials”

So I will check the parameters I am using to build the signature.

chris.spak
Level 1
Level 1

still haven’t been able to figure this out. It is going to be something small, but still annoying. Had a chat session with support and got a few ideas, but nothing has panned out so far.

chris.spak
Level 1
Level 1

some progress. Even though I have set up an admin API application in the control panel, I still think I might need to be given access to the api end points themselves. I am getting this error and I have double checked that I didn’t mix up the auth and admin Ikeys and skeys

The error:
“code”: 40102,
“message”: “Invalid integration key in request credentials”,
“stat”: “FAIL”

I figured it out. The admin-ikey was getting overwritten before the request was sent out.

Hi @chris.spak, thank you for following up here to share the solution with the community! Glad you were able to figure this out.

well I spoke too soon. I can get the request to work in Postman just fine, but it doesn’t work in my application. Obviously this is a problem with my app and not the API. At least I know everything is set correctly and I have a known good source to use to compare.

RElHOEpRVVFHVzhUQlE2MDNPVUw6M■■■■■■■■■■■■■■■■■■■■2I0NjMxNWJiMzkxZWNjZmU3MGE4NGVkNg=
how do you generate this key can you tell it would be helpfull for me

Quick Links