K
Kinde4mo ago
nixk

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
nixk
nixk4mo ago
Client error: POST https://auth.yakimachief.com/oauth2/token resulted in a 400 Bad Request response: {"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid paramet (truncated...)
this is the response i'm getting when using our custom domain
onderay
onderay4mo ago
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.
nixk
nixk4mo ago
yeah, we wrote a wrapping composer package, that accepts one host, and we're passing the custom domain by "we" i mean @Eric/a
viv (kinde)
viv (kinde)4mo ago
Hi @nixk - just wanted to quickly check if your audience value matches your custom domain name? Thanks
nixk
nixk4mo ago
it doesn't audience is https://yakimachief.kinde.com/api
Kinde
Kinde
App infrastructure as a service.
viv (kinde)
viv (kinde)4mo ago
Cool, could you try it with your custom domain instead and see if that works?
nixk
nixk4mo ago
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.
viv (kinde)
viv (kinde)4mo ago
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!
nixk
nixk4mo ago
that's all i'm getting back.
nixk
nixk4mo ago
ok, I updated our package to allow us to pass an "audience" param and am passing https://yakimachief.kinde.com and it's working
Kinde
Kinde
App infrastructure as a service.
viv (kinde)
viv (kinde)4mo ago
Sweet, glad to hear that's working!
nixk
nixk4mo ago
thank you all!