OAuth 2.0
Manual Authentication with HTTP Headers
If you are using direct API calls, use your Project API key and Secret as the header for basic HTTP authorization.
Example Header:
Authorization: Basic TElWRV9feDZqxOTdrZnZyYW91cjh4bXZ0.....
Where the string TElWRV9feDZqxOTdrZnZyYW91cjh4bXZ0...
is the base64 encoded version of your API Key and Secret in this format
<API_KEY>:<API_SECRET>
Example: LIVE__x6jzjv9bg1s53zcpz1o3:9jkzh13x9ig9rl8wiw78w8zj4f6723ewz531iub5kibl197kfvraour8xmvt
New Developer Authentication
- Log in and open the project of your choice.
- Go to project settings. (Or click "Share")
- Click the "Developer Authentication" button or select it as the member type.
Choose desired permissions level. 'Editor' is required to upload media.
Click generate.
Save the client secure in a secure place
The example shown is in the format for easy copy and paste to get started with our SDK. For production we recommend storing it as an environment variable.
project = Project(
host = "https://diffgram.my_domain.com",
project_string_id = "example",
client_id = "example_LIVE__mhgzzy0uzro21dqnvo334",
client_secret = "example_msqiagl0pn773r3pp51xvwnaif0vq7zuroliioqi")
Username & Password ("Basic Auth")
While using the "try it" feature of the docs, or our own Basic Auth setup:
client_id == username
client_secret == password