# REST API timeout

**URL:** <https://forum.shopware.com/t/rest-api-timeout/64275>\
**Category:** Programmierung\
**Created:** [27. Januar 2020 um 13:59 UTC](https://forum.shopware.com/t/rest-api-timeout/64275 "2020-01-27T13:59:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thandor](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Thandor](https://forum.shopware.com/u/Thandor)\
**Post date:** [27. Januar 2020 um 13:59 UTC](https://forum.shopware.com/t/rest-api-timeout/64275/1 "2020-01-27T13:59:49Z")

</div>

Hallo,

arbeite seit kurzem mit Shopware und versuche über ein eignes Programm auf die REST API zu zugreifen. Ich habe erfolgreich ein access\_token bekommen (/api/oauth/token).

Aber wenn ich jetzt versuche die “Hersteller” aufzulisten (/api/manufacturers), erhalte ich ein Timeout (Unexpected response status code: 408).

&nbsp;

Ich arbeite mit der Programmiersprach FreePascal:

```
var client : TFPHTTPClient;
    stream : TStringStream;
    baseURL, body : String;
    res : String;

    jData : TJSONData;
    jObject : TJSONObject;
    access_token : String;

begin
  baseURL := 'https://';

  InitSSLInterface();
  client := TFPHTTPClient.Create(nil);

  // Get access-token
  client.RequestHeaders.Add('Content-Type: application/json');

  body := '{' +
              '"client_id": "administration",' +
              '"grant_type": "password",' +
              '"scopes": "read",' +
              '"username": "",' +
              '"password": ""' +
          '}';
  stream := TStringStream.Create(body);
  client.RequestBody := TStream(stream);
  res := client.Post(baseURL + '/api/oauth/token');
  client.RequestBody := nil;
  jData := GetJSON(res);
  Writeln(jData.FormatJSON());

  jObject := TJSONObject(jData);
  access_token := jObject.Get('access_token');
  client.RequestHeaders.Add('Authorization: Bearer ' + access_token);

  writeln();
  writeln();

  // get manufactures-list
  Writeln('try to list manufacturers...');
  try
    writeln(client.Get(baseURL + '/api/manufacturers'));
  except
    on E:EHTTPClient do begin
      Writeln(E.Message);
    end;
  end;
  writeln('done.');

  Gotoxy(1,30);
  Write('Press any Key for exit.');
  Readkey();
end.

```

&nbsp;

Jemand eine Idee, was ich falsch mache? Oder woran das liegen könnte?

&nbsp;

LG  
Thandor

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [28. Januar 2020 um 23:40 UTC](https://forum.shopware.com/t/rest-api-timeout/64275/2 "2020-01-28T23:40:05Z")

</div>

Hallo @Thandor‍,

arbeitest du mit Shopware 6 oder Shopware 5??

beim Shopware5 gibt keine ‘api/oauth/token’&nbsp; Url .

das Authentication beim Shopware 5 ist&nbsp;Digest access authentication oder&nbsp;HTTP Basic authentication

[https://developers.shopware.com/developers-guide/rest-api/#authentication](https://developers.shopware.com/developers-guide/rest-api/#authentication)

und ob du arbeitest mit shopware 6 , dann wie ich sehe beim doc gibt kein&nbsp;manufacturers API .

VG,

![image](https://enbit.de/img/logo.svg)

Tel.: +49 755&nbsp;- 183 990 00 | E-Mail: [info@enbit.de](mailto:info@enbit.de) | Web:&nbsp;[http://enbit.de/](http://enbit.de/)

---

<div class="post-metadata">

**Author:** ![Thandor](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Thandor](https://forum.shopware.com/u/Thandor)\
**Post date:** [29. Januar 2020 um 06:22 UTC](https://forum.shopware.com/t/rest-api-timeout/64275/3 "2020-01-29T06:22:35Z")

</div>

Hallo ahmadsaad,

ich arbeite mit Shopware 6. Wenn ich „/api/articles“ versuche habe ich den selben Effect (Timeout).

Aber, wenn es „manufactures“ nicht gibt, warum ist das dann dokumentiert? ([https://developers.shopware.com/developers-guide/rest-api/?\_ga=2.126108420.846145349.1580115965-1508873618.1579697589#authentication](https://developers.shopware.com/developers-guide/rest-api/?_ga=2.126108420.846145349.1580115965-1508873618.1579697589#authentication)). Und warum bekomme ich dann kein 404?

LG  
Thandor

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [29. Januar 2020 um 10:15 UTC](https://forum.shopware.com/t/rest-api-timeout/64275/4 "2020-01-29T10:15:07Z")

</div>

Hallo @Thandor‍,

wenn du arbeitest mit Shopware 6, dann schreibst du deine Frage hier beim Shopware6 Forum:

[https://forum.shopware.com/categories/shopware-platform](https://forum.shopware.com/categories/shopware-platform)

vielleicht kann jemand dir hilfen, ich habe noch nicht so viel Erfahlung mit Shopware 6.

VG,
