Hi! I’m trying to use the TheirStack API (api.theirstack.com) with the HTTP API with JWT Authentication module. The API has a token than when authenticating with email and password returns an access token: https://api.theirstack.com/#tag/Auth/operation/login_via_body_token_from_json_post But when trying to set that up the JWT auth account in Clay, I get this generic error message: In the network tab what I see is a request to https://api.clay.com/v3/app-accounts/jwt/http-jwt-auth, with this response:
{"success":false,"appAccount":null}The endpoint receives the username and password in the body of a POST request, just the same way as Clay sends it, and it returns a json containing the access token. But Clay still returns an error. What am I doing wrong? Here’s the URL of the table but it has basically no data, the goal of it was trying to set up the HTTP with JWT Authentication module.
Hey hey! Can you drop the URL for your table here? (if applicable) 🫶 Don't worry, only admins will be able to open your table 😉
Great, thanks Arturo!
Hi, I replied on Slack but got no answer.Here’s the cURL with the credentials to authenticate into the API I’m trying to use in Clay: curl --location '[https://api.theirstack.com/token_from_json](https://api.theirstack.com/token_from_json)' \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --data-raw '{ "username": "[xoelop.test4@gmail.com](mailto:xoelop.test4@gmail.com)", "password": "0B04z#Xt7K$i!wJ*" }'That endpoint is one that receives the email and password in the body of a JSON post, the way Clay sends them.There’s also another endpoint that receives the data according to the OAuth2 spec, in x-www-form-urlencoded format: ```
curl -X 'POST'
'[https://api.theirstack.com/token](https://api.theirstack.com/token)'
-H 'accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
-d 'grant_type=&username=http://xoelop.test4%40gmail.com|xoelop.test4%40gmail.com&password=0B04z%23Xt7K%24i!wJ&scope=&client_id=&client_secret='
Please reply, a customer want to use our API and is considering Clay
Thanks!
Hi Colin, thanks for the reply. There was a typo, a missing * in the second cURL. Here it is fixed:
curl -X 'POST' \
'https://api.theirstack.com/token' \
-H 'accept: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=&username=xoelop.test4%40gmail.com&password=0B04z%23Xt7K%24i!wJ*&scope=&client_id=&client_secret='
Or
curl --location 'https://api.theirstack.com/token' \
--header 'accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant%C2%AD_type=' \
--data-urlencode 'username=xoelop.test4@gmail.com' \
--data-urlencode 'password=0B04z#Xt7K$i!wJ*' \
--data-urlencode 'scope=' \
--data-urlencode 'client%C2%AD_id=' \
--data-urlencode 'client%C2%AD_secret='
But Clay still returns an error, no matter what I do or what endpoint I use (both the /token one as well as the /token_from_json one that receives data in the format Clay sends it, in the body)
Cool, thanks
Hi, any updates on this?
hi guys, any updates? thanks a lot 😄
