0

I am attempting to make an authenticated call to Drupal 7 using services 3.7 in dart (Flutter framework)

I can retrieve a token and login but when I make a call to; [ENDPOINT]/user/[USER_ID] I get access denied. I am passing in the token in the header retrieved from [ENDPOINT]/user/token

This is my Dart code:

 Map<String, String> jsonHeaderData = {
        'Content-Type' : 'application/json',
        'X-CSRF-Token' : [TOKEN]
      };
      var response = await http.get('[URL]/[ENDPOINT]/user/1', headers: jsonHeaderData);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.