-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SamplePythonDataBridgesCall compilation error #1
Comments
4 tasks
In case it comes in handy, here is a bash script, to retrieve the initial API token, given your key and secret. BASIC_AUTH_USER=mykey
BASIC_AUTH_PASSWORD=mysecret
AUTH=$(echo -ne "$BASIC_AUTH_USER:$BASIC_AUTH_PASSWORD" | base64 --wrap 0)
curl -X POST -d "grant_type=client_credentials&scope=" -H "Authorization: Basic $AUTH" https://api.wfp.org/token It can be of use in case you decide to use something other than Python to use the API... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Valerio,
Thank you for putting up examples on using the DataBridges API!
I believe the SamplePythonDataBridgesCall contains some code at the end that prevents it from compiling... (from line 200).
It seems to be a recipe for creating an API token from a key and a secret. A standalone example to do that with curl would be helpful in it's own right!
The text was updated successfully, but these errors were encountered: