---
title: "gRPC Mock API"
url: "https://developer-acc.schiphol.nl/apis/greeter-grpc-api-1-public-acc/docs/grpc-mock-api"
image: "https://developer-acc.schiphol.nl/_og/d/c_Ocean.takumi,title_gRPC+Mock+API,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnt9fX0,p_Ii9hcGlzL2dyZWV0ZXItZ3JwYy1hcGktMS1wdWJsaWMtYWNjL2RvY3MvZ3JwYy1tb2NrLWFwaSI,s_or22-y7lrKs2-6Nw.png"
---

# gRPC Mock API

## [API Information](#api-information)

**Name:** `greeter`  
**Version:** `1.0`  
**Protocol:** gRPC

---

## [Description](#description)

This API provides access to mock user data via gRPC. The following proto file can be used for gRPC calls.

```text
syntax = "proto3";

package public;

service Greeter {
  rpc SayHello (HelloRequest) returns (HelloReply) {}
  rpc SayHelloStreamReply (HelloRequest) returns (stream HelloReply) {}
  rpc SayHelloBidiStream (stream HelloRequest) returns (stream HelloReply) {}
}

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}
```

---

## [Authentication](#authentication)

OAuth2 Bearer Token, acquired using the OAuth client credentials flow:

-   **ACC:** `https://api-acc.auth.schiphol.nl/oauth/token`
-   **PRD:** `https://api.auth.schiphol.nl/oauth/token`

Include the token in the `Authorization` header:

```text
Authorization: Bearer <token>
```

---

## [Example Request](#example-request)

Save the proto file as for example sample\_grpc.proto and then use below sample request

```bash
grpcurl \
  -import-path . \
  -proto sample_grpc.proto \
  -H "authorization: Bearer {token}" \
  -d '{"name": "Ali"}' \
  -insecure \
  {api-endpoint}:443 \
  public.Greeter/SayHello
```