{% extends '@DWGinger/base.devel.html.twig' %} {% block body %}

Greetings, {{ app.user.username|upper }}!

This quick start guide will help you getting started on how to use the Ginger API and work with our development tools.

Let´s keep things spicy and bring it own!

{% if app.user.apiClient is not null and app.user.apiClient.publicId and app.user.apiClient.secret %}

Tools

API Docs

Read the API documentation or send requests to the API directly from the UI

GraphQL Playground

GraphQL IDE for better development workflows (interactive schema docs, query-history and more...)

Authentication

To interact with the Ginger API send a bearer token in the Authorization header with your requests.

In addition to your username and password you`ll need the following app credentials at your fingertips to gain a valid access token:

Parameter Value
client_id {{ app.user.apiClient.publicId }}
client_secret {{ app.user.apiClient.secret }}

Obtaining a token

In order to get a valid access token to work with the API you can either authenticate your requests from within the API Docs or fetch the token by yourself.

Using the API Docs

From now on the access token will be sent along with the request headers so you can access to the API:

Fetch token manually

Issue a GET or POST request to {{ path('fos_oauth_server_token') }} containing the following payload:

Parameter Value
client_id {{ app.user.apiClient.publicId }}
client_secret {{ app.user.apiClient.secret }}
grant_type password
username {{ app.user.username }}
password {use-your-password-for-this}
{% else %}

Oooops

Seems there is no API client available for you yet. Sorry for that, please get in touch with our team so we can fix this for you...

{% endif %} {% endblock %}