Bynder OAuth 2.0 API

OAuth 2.0 authorization for a Bynder portal: the authorize endpoint, the token endpoint (authorization code, client credentials and refresh token grants) and a runtime scope reference that returns each scope with the user permissions it requires.

OpenAPI Specification

bynder-oauth2-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"OAuth 2.0","version":"1.0.0"},"tags":[{"name":"Authorize endpoint","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":"Token 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":"Scopes 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"}],"paths":{"/v6/authentication/oauth2/auth":{"get":{"summary":"Authorize endpoint","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","tags":["Authorize endpoint"],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"},{"name":"scope","in":"query","required":true,"schema":{"type":"string"},"example":"offline asset:read"},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string"},"example":"https://localhost/callback"},{"name":"response_type","in":"query","required":true,"schema":{"type":"string"},"example":"code"},{"name":"state","in":"query","required":false,"schema":{"type":"string"},"example":"xyz"}],"responses":{"302":{"description":"Found. Redirecting to the login provider.","headers":{"Location":{"description":"URL to redirect the user to for login.","schema":{"type":"string"}}},"content":{"text/plain":{"examples":{"example-1":{"value":"Found. Redirecting to https://your-bynder-domain/v6/login-provider/login?login_challenge=8e41a26ceb3b845114b5a37d9d0e2e50"}}}}}},"security":[{"OAuth2":[]}]}},"/v6/authentication/oauth2/token":{"post":{"summary":"Using an authorization code or the refresh token","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","tags":["Token endpoint"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Application client ID.","example":"00000000-0000-0000-0000-000000000000"},"client_secret":{"type":"string","description":"Application client secret.","example":"00000000-0000-0000-0000-000000000000"},"grant_type":{"type":"string","description":"Identifies the grant type being used. For Authorization Code grant use **authorization_code**.","example":["authorization_code","refresh_token","client_credentials"]},"redirect_uri":{"type":"string","description":"The URL specified in the Authorize application request, the values must match.","example":"https://localhost/callback"},"code":{"type":"string","description":"The Authorization Code returned from the Authorize application request.","example":"6440327e7ddb660435e377a17a5463ba"},"scope":{"type":"string","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"},"refresh_token":{"type":"string","description":"Refresh token returned from the Retrieve token request.","example":"c11e...b5bc"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string","example":"c12e...b5dc"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":3600},"access_token":{"type":"string","example":"eyJh...NDcw"},"scope":{"type":"string","example":"offline asset:read"}}},"examples":{"example-1":{"value":{"token_type":"bearer","expires_in":3600,"access_token":"eyJh...NDcw","scope":"offline asset:read"}}}}}}}}},"/v6/authentication/oauth2/scopes":{"get":{"summary":"Retrieve scopes","description":"Retrieve a JSON formatted overview of the existing scopes within Bynder and the required user permissions.","tags":["Scopes"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Group name"},"scopes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"scope:action"},"description":{"type":"string","example":"Scope description"},"anyOfPermissions":{"type":"array","items":{"type":"string","example":"scope.permission"}}}}}}}}}},"examples":{"example-1":{"value":{"groups":[{"name":"Group name","scopes":[{"name":"scope:action","description":"Scope description","anyOfPermissions":["scope.permission"]}]}]}}}}}}}}}}}