create request with python requests (translation from another language to python)

curl -v POST https://api-m.sandbox.paypal.com/v1/oauth2/token \
  -H "Accept: application/json" \
  -H "Accept-Language: en_US" \
  -u "CLIENT_ID:SECRET" \
  -d "grant_type=client_credentials"

This piece of code is from the api documentation. I can't figure out how to perform this action in python. Please help me to complete this query using python.



Read more here: https://stackoverflow.com/questions/68484682/create-request-with-python-requests-translation-from-another-language-to-python

Content Attribution

This content was originally published by Erick Mamberger at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: