Applications API
Introduced in GitLab 10.5.
Applications API operates on OAuth applications for:
- Using GitLab as an authentication provider.
- Allowing access to GitLab resources on a user’s behalf.
Note:
Only admin users can use the Applications API.
Create an application
Create an application by posting a JSON payload.
Returns 200
if the request succeeds.
POST /applications
Parameters:
Attribute | Type | Required | Description |
---|---|---|---|
name
| string | yes | Name of the application. |
redirect_uri
| string | yes | Redirect URI of the application. |
scopes
| string | yes | Scopes of the application. |
Example request:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "name=MyApplication&redirect_uri=http://redirect.uri&scopes=" https://gitlab.example.com/api/v4/applications
Example response:
{
"id":1,
"application_id": "5832fc6e14300a0d962240a8144466eef4ee93ef0d218477e55f11cf12fc3737",
"application_name": "MyApplication",
"secret": "ee1dd64b6adc89cf7e2c23099301ccc2c61b441064e9324d963c46902a85ec34",
"callback_url": "http://redirect.uri"
}
List all applications
List all registered applications.
GET /applications
Example request:
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications
Example response:
[
{
"id":1,
"application_id": "5832fc6e14300a0d962240a8144466eef4ee93ef0d218477e55f11cf12fc3737",
"application_name": "MyApplication",
"callback_url": "http://redirect.uri"
}
]
Note:
The
secret
value will not be exposed by this API.Delete an application
Delete a specific application.
Returns 204
if the request succeeds.
DELETE /applications/:id
Parameters:
-
id
(required) - The id of the application (not the application_id)
Example request:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications/:id
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc