I’d like to connect to platform.sh API. Unfortunately i fail with authentication already. There is no prebuilt module, so i need to go with HTTP module. What is did so far:
error: invalid_request error_description:The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Client credentials missing or malformed in both HTTP Authorization header and HTTP POST body.
Reason i don’t use this is: I only have this description about how to authenticate to p.sh Platform.sh API Documentation
And when i use the default OAuth2 Module from HTTP and add a new connection, i need to fill in fields that are not mentioned there and i don’t know them:
I solved it now by doing this, maybe interesting for others as well:
1.) HTTP Module with POST request to Platform.sh authentication and two fields
Key: grant_type Value: api_token
Key: api_token Value: MY_TOKEN
Body type: Application/x-www-form-urlencoded
With this reuqest i get the Bearer token in the response
2.) With this Bear token, i do a second HTTP GET request to the actual API like https://api.platform.sh/my_needed_request_here with Header
Name: Authorization
Value: Bearer BEARER_TOKEN