https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can I create a post request to get an oauth2 t...
# 💬・general
o
@AI Evy how can I create a post request to get an oauth2 token?
a
Thanks for tagging me @objectsclattering. I'll look through relevant sources and get back to you shortly.
### Answer The official Retell AI documentation does not provide an explicit code example or endpoint for making a POST request to obtain an OAuth2 token. However, obtaining an OAuth2 token is generally done by making a POST request to the token endpoint of the service you want to authenticate with, supplying the required parameters such as client_id, client_secret, grant_type, and others as specified by that service. If you want a generic answer on how to make a POST request for OAuth2 tokens or an example in a particular language, let me know and I can provide that. For Retell AI-specific flows, there is no direct documentation for this action. Check out these potentially useful sources: - [Custom Function]() - [CALLS TO EXTERNAL APIS USING OAUTH 2.0 TOKENS]() - [LIVE WORKSHOP: Build an Outbound AI Caller for Mortgage Leads!](

▾

) Would you like a general answer on how to construct such a POST request?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
o
How can I specify the client_id and secret in the request body?
a
Thanks for the feedback, glad I was helpful.
d
@objectsclattering you can hard code the client_id and secret in the function call
o
It needs to go in the body of the post call and I don't see how can I generate the body correctly