---
title: "OAuth 2.0"
url: "https://earlyaccess.developers.bynder.com/apis/o-auth-20-1/versions/09a25bc1-038b-40be-a677-10c314a6ec04"
---

# OAuth 2.0

OpenAPI specification document.

```json
{"info":{"title":"OAuth 2.0","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v6/authentication/oauth2/auth":{"get":{"description":"When using the Authorization Code grant, redirect the user to the Authorize application endpoint. After the user is authenticated and approves the authorization request, Bynder will redirect the user back with an authorization code which can then be passed to the Token endpoint.\n","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"query","name":"client_id","required":true,"schema":{"type":"string"}},{"example":"offline asset:read","in":"query","name":"scope","required":true,"schema":{"type":"string"}},{"example":"https://localhost/callback","in":"query","name":"redirect_uri","required":true,"schema":{"type":"string"}},{"example":"code","in":"query","name":"response_type","required":true,"schema":{"type":"string"}},{"example":"xyz","in":"query","name":"state","required":false,"schema":{"type":"string"}}],"responses":{"302":{"content":{"text/plain":{"examples":{"example-1":{"value":"Found. Redirecting to https://your-bynder-domain/v6/login-provider/login?login_challenge=8e41a26ceb3b845114b5a37d9d0e2e50"}}}},"description":"Found. Redirecting to the login provider.","headers":{"Location":{"description":"URL to redirect the user to for login.","schema":{"type":"string"}}}}},"security":[{"OAuth2":[]}],"summary":"Authorize endpoint","tags":["Authorize endpoint"]}},"/v6/authentication/oauth2/scopes":{"get":{"description":"Retrieve a JSON formatted overview of the existing scopes within Bynder and the required user permissions.","responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"groups":[{"name":"Group name","scopes":[{"anyOfPermissions":["scope.permission"],"description":"Scope description","name":"scope:action"}]}]}}},"schema":{"properties":{"groups":{"items":{"properties":{"name":{"example":"Group name","type":"string"},"scopes":{"items":{"properties":{"anyOfPermissions":{"items":{"example":"scope.permission","type":"string"},"type":"array"},"description":{"example":"Scope description","type":"string"},"name":{"example":"scope:action","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Successful response"}},"summary":"Retrieve scopes","tags":["Scopes"]}},"/v6/authentication/oauth2/token{authorization}":{"post":{"description":"Use the token endpoint to retrieve an access token which can be used to authorize API\nrequests. This endpoint supports the Authorization Code grant, the Refresh Token grant and the Client Credentials grant.\n","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"description":"Application client ID.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"client_secret":{"description":"Application client secret.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"code":{"description":"The Authorization Code returned from the Authorize application request.","example":"6440327e7ddb660435e377a17a5463ba","type":"string"},"grant_type":{"description":"Identifies the grant type being used. For Authorization Code grant use **authorization_code**.","example":["authorization_code","refresh_token","client_credentials"],"type":"string"},"redirect_uri":{"description":"The URL specified in the Authorize application request, the values must match.","example":"https://localhost/callback","type":"string"},"scope":{"description":"List of scopes to request to be granted to the access token. Can only be a subset of the scopes requested in the Authorize application request. When not passed, all the scopes will be requested.","example":"offline asset:read","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"access_token":"eyJh...NDcw","expires_in":3600,"scope":"offline asset:read","token_type":"bearer"}}},"schema":{"properties":{"access_token":{"example":"eyJh...NDcw","type":"string"},"expires_in":{"example":3600,"type":"integer"},"refresh_token":{"example":"c12e...b5dc","type":"string"},"scope":{"example":"offline asset:read","type":"string"},"token_type":{"example":"bearer","type":"string"}},"type":"object"}}},"description":"Successful response"}},"summary":"Using an authorization code","tags":["Token endpoint"]}},"/v6/authentication/oauth2/token{client_credentials}":{"post":{"description":"Use the token endpoint to retrieve an access token which can be used to authorize API\nrequests. This endpoint supports the Authorization Code grant, the Refresh Token grant and the Client Credentials grant.\n","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"description":"Application client ID.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"client_secret":{"description":"Application client secret.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"grant_type":{"description":"Identifies the grant type being used. For Authorization Code grant use **authorization_code**.","example":["authorization_code","refresh_token","client_credentials"],"type":"string"},"scope":{"description":"List of scopes to request to be granted to the access token. Can only be a subset of the scopes requested in the Authorize application request. When not passed, all the scopes will be requested.","example":"offline asset:read","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"access_token":"eyJh...NDcw","expires_in":3600,"scope":"offline asset:read","token_type":"bearer"}}},"schema":{"properties":{"access_token":{"example":"eyJh...NDcw","type":"string"},"expires_in":{"example":3600,"type":"integer"},"refresh_token":{"example":"c12e...b5dc","type":"string"},"scope":{"example":"offline asset:read","type":"string"},"token_type":{"example":"bearer","type":"string"}},"type":"object"}}},"description":"Successful response"}},"summary":"Using client credentials","tags":["Token endpoint"]}},"/v6/authentication/oauth2/token{refresh}":{"post":{"description":"Use the token endpoint to retrieve an access token which can be used to authorize API\nrequests. This endpoint supports the Authorization Code grant, the Refresh Token grant and the Client Credentials grant.\n","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"description":"Application client ID.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"client_secret":{"description":"Application client secret.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"grant_type":{"description":"Identifies the grant type being used. For Authorization Code grant use **authorization_code**.","example":["authorization_code","refresh_token","client_credentials"],"type":"string"},"refresh_token":{"description":"Refresh token returned from the Retrieve token request.","example":"c11e...b5bc","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"access_token":"eyJh...NDcw","expires_in":3600,"scope":"offline asset:read","token_type":"bearer"}}},"schema":{"properties":{"access_token":{"example":"eyJh...NDcw","type":"string"},"expires_in":{"example":3600,"type":"integer"},"refresh_token":{"example":"c12e...b5dc","type":"string"},"scope":{"example":"offline asset:read","type":"string"},"token_type":{"example":"bearer","type":"string"}},"type":"object"}}},"description":"Successful response"}},"summary":"Using a refresh token","tags":["Token endpoint"]}}},"tags":[{"description":"When using the Authorization Code grant, redirect the user to the [Authorize application](#reference/oauth-2.0/authorize-endpoint/authorize-application) endpoint. After the user\nis authenticated and approves the authorization request, Bynder will redirect the user back with an\nauthorization code which can then be passed to the [Token endpoint](#reference/oauth-2.0/token-endpoint/using-an-authorization-code).\n","name":"Authorize endpoint"},{"description":"Use the token endpoint to retrieve a access token which can be used to authorize API\nrequests. Depending on the type of grant, different fields are required which are\noutlined per request.\n\n_The token endpoint requires authorization either in the body or by\nsending the Authorization header._\n","name":"Token endpoint"},{"description":"The scopes endpoint provides a JSON formatted overview of the existing scopes within Bynder\nand what user permissions are required in order for the OAuth2 service to grant a scope to a user.\n","name":"Scopes endpoint"}]}
```
