Machine to Machine Account & Custom Domain
When making an api call with a machine to machine account, it's working with our {businesname}.kinde.com domain but not with our custom domain. Have I configured something incorrectly, or do i need to enable the custom domain in the M2M app somehow?
12 Replies
Client error:this is the response i'm getting when using our custom domainPOST https://auth.yakimachief.com/oauth2/token
resulted in a400 Bad Request
response: {"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid paramet (truncated...)
Are you able to confirm that you have all your API calls setup using your custom domain?
As if your API calls are working with your {businessname}.kinde.com domain but not with your custom domain, it suggests that the issue might not be with the configuration of the M2M application itself but rather with how you're attempting to use the tokens between the different domains.
yeah, we wrote a wrapping composer package, that accepts one host, and we're passing the custom domain
by "we" i mean @Eric/a
Hi @nixk - just wanted to quickly check if your audience value matches your custom domain name? Thanks
it doesn't audience is https://yakimachief.kinde.com/api
Cool, could you try it with your custom domain instead and see if that works?
I can't edit the audience.
I did just find this:
Enter the Access Token URL, using the domain variable you created above. For example, {{business_domain}}.kinde.com/oauth2/token. Note that even if you use a custom subdomain domain, the access token URL needs to include the kinde.com domain.https://kinde.com/docs/build/get-access-token-for-connecting-securely-to-kindes-api/
Kinde Docs
Get access token for connecting securely to Kinde’s API - Build on ...
Our developer tools provide everything you need to get started with Kinde.
Ahh - is there a little more to that err that could shed some light on what's missing / malformed ->
The request is missing a required parameter, includes an invalid paramet (truncated...)
?
Also just confirming that the audience has been turned on in Kinde admin? thanks!that's all i'm getting back.
ok, I updated our package to allow us to pass an "audience" param and am passing https://yakimachief.kinde.com and it's working
Sweet, glad to hear that's working!
thank you all!