Backendless Support
 
Not Covered by Support

accessToken missing (Login with Facebook(REST Api))

Greetings,

Am getting error

  1. {"code":3038,"message":"Parameter 'accessToken' is missing or null","errorData":{}}

This is inspite accessToken being manifestly present in the Request Payload

  1. {"accessToken":"EAAQdDZBkyNK4BAHKhLVKYuc6Vsu1yssX6s9i7pDFPUmpZAXv9XweZCoBrR0VprxFCcrPcTx0loXQdPbzVq3gta7E6QdAXpItamzPd68CrX0kZB6R2O4VS7fsfmoaG2n3IOqE7drIsGHzRWzfZCAqQHxXiGoCNsK5qLUDrE4xA3VELX19CGQCwNZAI8EXlbyasKZB5qyMdEfS9EfLKjObDKNhyqHYbMzOPJiAZD","fieldsMapping":{"id":"id","name":"name","email":"email","gender":"gender"}}

Retrofit Java interface.

  1. public interface ApiService {
  2. @Headers("Content-Type: application/json")
  3. @POST("users/social/facebook/sdk/login")
  4. Single<LoginResponse> faceBookLogin(@Body JSONObject jsonObjectBody); // Rxjava Single
  5. }

And my base url

  1. https://api.backendless.com/MY-APP-ID/MY-REST-API-KEY/

What could have changed because it was working the past several weeks i have been debugging?

Regards,

George

Leave a Comment

Comments (7)

photo
1

Hello George

I just tried it with Postman and looks like everything works well

d86aee612322c36233547b04868d4258

334d94bd762a5ff35ab2cf6f9a7822df

Could you try your request with Postman

Regards, Vlad

photo
1

HI, George.

I've tried with my test app and login works correctly.

Could you try login simply in console, for example with curl.

And post here the whole curl request.

photo
1

Hi Oleg, yes with POSTMAN, it’s working from my end too like I indicated in my first post, from android emulator it’s not, though it’s been working without problems.

photo
1

do you use Backendless AndroidSDK in your Application?

photo
1

and could you please provide your appId?

photo
photo
1

850D233C-6AC2-244C-FFC5-ED60D85BFB00

I have BackendlessSDK as a gradle dependency , am making the call via REST API.

G

photo
1

Hi George

I've also tried making a REST login request via cURL and Postman and it worked without any problems. This error is thrown when accessToken parameter is missing in request, if it's invalid the error message differs.

Most likely the error is related to the request body which is being sent. You may try using UrlConnection to make the same rest request to check whether the behavior will remain the same or not. But debugging and checking what goes wrong in a project/sample which uses a 3rd party library is out of our free support policy

Best Regards