# Using OAuth applications

Appmixer comes with a set of prepared components (applications). Some of them use OAuth 1 (Twitter) authentication mechanism and some of them (Slack, Google) use OAuth 2 authentication mechanism.

If you try to use the Slack component right after fresh Appmixer installation you will get an error `Missing client ID`.

![](https://3013747694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LATDgYqVMe0hChW7efU%2F-MHG39XXcO3l-U_rHgvz%2F-MHG9L2WnX15ic5SKLoB%2FAppmixer.png?alt=media\&token=eec70fab-aa80-4da6-931c-fcd330768e2e)

In the case of the OAuth 1 application, the error will be `Missing consumer key`. As described [here](https://docs.appmixer.com/6.0/v4.3/component-definition/authentication#authentication-mechanisms) the OAuth applications need these secrets. The reason we do not provide these secrets with Appmixer is simple. Part of the OAuth application registered in the third party service is the redirect URL which points to your server URL where the Appmixer backend API is running.&#x20;

Therefore you need to create these OAuth applications on your own. At the end of the process, you will always get a client ID and client Secret (OAuth 2).&#x20;

Before installing an OAuth application, please visit the APP registration section. It contains specific settings for each application.

The OAuth variables can be set through the [Backoffice](https://docs.appmixer.com/6.0/v4.3/appmixer-backoffice/services).

### GRIDD\_URL

There is another ENV variable that is used for OAuth redirects. It is called GRIDD\_URL.

```
engine:
    ...
    environment:
      - APPMIXER_API_URL=${APPMIXER_API_URL:-http://localhost:2200}
      - GRIDD_URL=${APPMIXER_API_URL:-http://localhost:2200}
    ...
```

By default, the GRIDD\_URL will be set to <http://localhost:2200>. This is fine for local development. For most of the services, you can register <http://localhost:2200> as a callback URL. In production, this has to point to your Appmixer's public API URL.

If you run the following command:

```
APPMIXER_API_URL=https://247bb870a6f4.ngrok.io docker-compose --project-name appmixer up
```

It will set both the APPMIXER\_API\_URL and the GRIDD\_URL to the <https://247bb870a6f4.ngrok.io>.

Another way would be replacing the variables directly in docker-compose.yml file.&#x20;

```
engine:
    ...
    environment:
      - APPMIXER_API_URL=https://247bb870a6f4.ngrok.io
      - GRIDD_URL=https://247bb870a6f4.ngrok.io
    ...
```

Or you can set just the GRIDD\_URL like this:

```
engine:
    ...
    environment:
      - GRIDD_URL=https://247bb870a6f4.ngrok.io
    ...
```

If APPMIXER\_API\_URL is not set, Appmixer will use the value from GRIDD\_URL.&#x20;

Appmixer engine will print out values of these variables when starting so you can check they are set correctly:

![](https://3013747694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LATDgYqVMe0hChW7efU%2F-MNhJEgAps0ULqJSS06U%2F-MNhJlDdJaZAiuYNyoFU%2F1__zsh.png?alt=media\&token=4b66b9c2-8700-410b-bbac-a0feb57d5cd5)
