hey team, any idea why I get a 404 when calling th...
# talk-kratos
s
hey team, any idea why I get a 404 when calling this API using the golang sdk?
sessions, r, err := instance.OryClient.Kratos.IdentityApi.ListSessions(ctx).Execute()
The admin server is configured, right before this line, I call the
GetIdentity
I think i’ve found the issue, not sure why this is happening tho:
Copy code
<http://127.0.0.1:4434/admin/identities/>
<http://127.0.0.1:4433//admin/sessions/>
it seems that the second call is using the public url. I guess I’ll create two clients, instead of using two urls, as suggested in the docs.
when using the admin url, I still get 404, looking at the request, I see this:
Copy code
<http://127.0.0.1:4434/admin/admin/sessions/>
I’m a bit lost, if I call the /admin/identities with the public url it works, but with the admin url it doesnt?
b
Hi! We indeed recommend using two instances of the client: one for the public endpoints, and one for admin. However, the router should be able to redirect between them, so you can use the
public
client for admin queries as well. Looking at the URLs you posted, there seems to be an added slash (
/
) before the path in the
/admin/sessions
URL. That is most likely the issue.
s
I also think that’s the issue, but I’m using the SDK
b
Could you post, how you create the SDK in your code?
s
sure, one sec
My urls in the config ends with a trailing slash, so that’s on me 😄