Hello All,
I am new to Elixir and so far having fun learning. I am trying to call a REST API using HTTPoison and am running into an Issue.
Here is what I am trying to do.
I need to generate an access token by sending a POST
request to the authorization server:
https://test.example.com/v2/security/oauth2/token
This is the curl command to get the access token.
curl “https://test.example.com/v2/security/oauth2/token”
-H “Content-Type: application/x-www-form-urlencoded”
-d “grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}”
I want to use HTTPoison to get the access token which will then be used to pull the data.
Anyone has any example how to convert the curl to HTTPoison?
Regards,
Venkat