Creating OAuth Clients using the Dashboard/Advanced API

Hi,

https://tyk.io/tyk-documentation/concepts/dashboard-api/ mentions that “The Tyk Dashboard API is a superset of the Tyk Gateway API, enabling (almost) all of the core features”.

Is there a Dashboard API equivalent to those described here: https://tyk.io/tyk-documentation/tyk-rest-api/oauth-key-management/?

Specifically I’m looking to create OAuth clients programmatically (for automated deployment purposes). I’ve tested this successfully when using the Gateway API directly, but would like to achieve this through the Dashboard API without needing to use the x-tyk-authorization secret.

Thanks.

Yes there is, the dashboard API equivalent is:

Get OAuth Clients:

GET /api/apis/oauth/:apiId

{
	"apps": [{
		"client_id": "6a01a2ee91624d2b70838e237d450b14",
		"secret": "NjFlZWIyNmEtZTdjMC00OTc4LTVlMmUtZDBjMGVhNGIyNGQy",
		"redirect_uri": "http://test.com",
		"policy_id": "56c3602c30c55e4322000004"
	}],
	"pages": 0
}

Create OAuth client:

POST /api/apis/oauth/:apiId

{
	"redirect_uri": "http://test.com",
	"policy_id": "56c3602c30c55e4322000004"
}

Get OAuth Client Detail:

GET /api/apis/oauth/:apiId/:appId

{
	"client_id": "6a01a2ee91624d2b70838e237d450b14",
	"secret": "NjFlZWIyNmEtZTdjMC00OTc4LTVlMmUtZDBjMGVhNGIyNGQy",
	"redirect_uri": "http://test.com",
	"policy_id": "56c3602c30c55e4322000004"
}

Delete OAuth Client:

DELETE /api/apis/oauth/:apiId/:appId

{
	"Status": "OK",
	"Message": "OAuth Client deleted succesfully",
	"Meta": null
}

Perfect - just what I was looking for. Thanks for the quick response @Martin

1 Like