Support Topics Documentation Slack YouTube Blog

Twitter Login not working

Following up from a Slack conversation with Mark Piller:

What should the callback URL be for the twitter account using the REST API? I am getting the following Twitter error when attempting step 6 of the twitter social login tutorial:

https://backendless.com/docs/rest/mgmt_social_settings.html

This is the error I am getting:

{"code":3022,"message":"Unable to login user due to error: 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).\n<?xml version='1.0' encoding='UTF-8'?><errors><error code=\"415\">Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings</error></errors>\n","errorData":{}}

Thanks for your help!

Hi Kasey,

So that the product team can assist you as quickly as possible, could you please attach a screenshot showing how you configured the app in your Twitter account?

Regards,
Mark

1 Like

As Mark suggested, here is the set up of my twitter account:

Thanks for any help you can provide!

Hello @Kasey_Luft

We will definitely update the documentation for setting up Twitter login.
In your Twitter developer account you should add the following links:

Website URL:

Callback URL:

Organization website URL:

Also remember to add the consumer API keys: https://monosnap.com/direct/mqS5B6YoiPGX4RbZjtAFXZH0iipX4G

Regards,
Inna

@Inna_Shkolnaya Thanks I was able to get to the authorization page! However, when I clicked authorize I got this very long stack trace - is that normal? When I click authorize, what should it do?

{"cause":{"cause":null,"stackTrace":[{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"_assertNotNull","fileName":"ObjectMapper.java","lineNumber":4413,"className":"com.fasterxml.jackson.databind.ObjectMapper","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"readTree","fileName":"ObjectMapper.java","lineNumber":2709,"className":"com.fasterxml.jackson.databind.ObjectMapper","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"parse","fileName":"Json.java","lineNumber":164,"className":"play.libs.Json","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"getFieldsMappingFromMap","fileName":"Social.java","lineNumber":360,"className":"controllers.Social","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"authorize","fileName":"Social.java","lineNumber":170,"className":"controllers.Social","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$applyOrElse$1027","fileName":"Routes.scala","lineNumber":14229,"className":"router.Routes$$anonfun$routes$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"resultCall","fileName":"HandlerInvoker.scala","lineNumber":146,"className":"play.core.routing.HandlerInvokerFactory$$anon$8","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"resultCall","fileName":"HandlerInvoker.scala","lineNumber":145,"className":"play.core.routing.HandlerInvokerFactory$$anon$8","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"invocation","fileName":"HandlerInvoker.scala","lineNumber":111,"className":"play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$3$$anon$4$$anon$5","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"JavaAction.scala","lineNumber":119,"className":"play.core.j.JavaAction$$anon$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"DefaultActionCreator.java","lineNumber":33,"className":"play.http.DefaultActionCreator$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"OriginAction.java","lineNumber":53,"className":"com.backendless.old.security.OriginAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ValidateApplication.java","lineNumber":71,"className":"com.backendless.old.security.ValidateApplication","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ApplicationExistenceAndUseAction.java","lineNumber":39,"className":"com.backendless.old.security.ApplicationExistenceAndUseAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ConsiderApiCallAction.java","lineNumber":29,"className":"com.backendless.old.security.ConsiderApiCallAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"TimeOutAction.java","lineNumber":28,"className":"com.backendless.TimeOutAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"SimultaneousApiCallLimitAction.java","lineNumber":26,"className":"com.backendless.SimultaneousApiCallLimitAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"StaticHttpResponseHeadersAction.java","lineNumber":22,"className":"com.backendless.StaticHttpResponseHeadersAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"StackOverflowHandlerAction.java","lineNumber":21,"className":"com.backendless.StackOverflowHandlerAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"CloseEntityManagerAction.java","lineNumber":36,"className":"com.backendless.CloseEntityManagerAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"CurrentRequestsNumberAction.java","lineNumber":31,"className":"com.backendless.CurrentRequestsNumberAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$8","fileName":"JavaAction.scala","lineNumber":175,"className":"play.core.j.JavaAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$1","fileName":"Future.scala","lineNumber":659,"className":"scala.concurrent.Future$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$map$1","fileName":"Try.scala","lineNumber":255,"className":"scala.util.Success","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Try.scala","lineNumber":213,"className":"scala.util.Success","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$map$1","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"liftedTree1$1","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$transform$1","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Promise.scala","lineNumber":64,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$execute$1","fileName":"HttpExecutionContext.scala","lineNumber":63,"className":"play.core.j.HttpExecutionContext","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"execute","fileName":"Execution.scala","lineNumber":70,"className":"play.api.libs.streams.Execution$trampoline$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"execute","fileName":"HttpExecutionContext.scala","lineNumber":58,"className":"play.core.j.HttpExecutionContext","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"executeWithValue","fileName":"Promise.scala","lineNumber":72,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete","fileName":"Promise.scala","lineNumber":372,"className":"scala.concurrent.impl.Promise$KeptPromise$Kept","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete$","fileName":"Promise.scala","lineNumber":371,"className":"scala.concurrent.impl.Promise$KeptPromise$Kept","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform$","fileName":"Promise.scala","lineNumber":31,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map$","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"Future.scala","lineNumber":659,"className":"scala.concurrent.Future$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"JavaAction.scala","lineNumber":176,"className":"play.core.j.JavaAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$4","fileName":"Action.scala","lineNumber":82,"className":"play.api.mvc.Action","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$mapFuture$4","fileName":"Accumulator.scala","lineNumber":167,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"Try.scala","lineNumber":213,"className":"scala.util.Try$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$mapFuture$3","fileName":"Accumulator.scala","lineNumber":167,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Accumulator.scala","lineNumber":198,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$run$2","fileName":"Accumulator.scala","lineNumber":215,"className":"play.api.libs.streams.FlattenedAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$flatMap$1","fileName":"Future.scala","lineNumber":307,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$transformWith$1","fileName":"Promise.scala","lineNumber":41,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Promise.scala","lineNumber":64,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"processBatch","fileName":"BatchingExecutor.scala","lineNumber":55,"className":"akka.dispatch.BatchingExecutor$AbstractBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$run$1","fileName":"BatchingExecutor.scala","lineNumber":92,"className":"akka.dispatch.BatchingExecutor$BlockableBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"JFunction0$mcV$sp.java","lineNumber":23,"className":"scala.runtime.java8.JFunction0$mcV$sp","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"withBlockContext","fileName":"BlockContext.scala","lineNumber":85,"className":"scala.concurrent.BlockContext$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"BatchingExecutor.scala","lineNumber":92,"className":"akka.dispatch.BatchingExecutor$BlockableBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"AbstractDispatcher.scala","lineNumber":47,"className":"akka.dispatch.TaskInvocation","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"runWorker","fileName":"ThreadPoolExecutor.java","lineNumber":1128,"className":"java.util.concurrent.ThreadPoolExecutor","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"run","fileName":"ThreadPoolExecutor.java","lineNumber":628,"className":"java.util.concurrent.ThreadPoolExecutor$Worker","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"run","fileName":"Thread.java","lineNumber":834,"className":"java.lang.Thread","nativeMethod":false}],"message":"argument \"content\" is null","suppressed":[],"localizedMessage":"argument \"content\" is null"},"stackTrace":[{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"parse","fileName":"Json.java","lineNumber":166,"className":"play.libs.Json","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"getFieldsMappingFromMap","fileName":"Social.java","lineNumber":360,"className":"controllers.Social","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"authorize","fileName":"Social.java","lineNumber":170,"className":"controllers.Social","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$applyOrElse$1027","fileName":"Routes.scala","lineNumber":14229,"className":"router.Routes$$anonfun$routes$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"resultCall","fileName":"HandlerInvoker.scala","lineNumber":146,"className":"play.core.routing.HandlerInvokerFactory$$anon$8","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"resultCall","fileName":"HandlerInvoker.scala","lineNumber":145,"className":"play.core.routing.HandlerInvokerFactory$$anon$8","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"invocation","fileName":"HandlerInvoker.scala","lineNumber":111,"className":"play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$3$$anon$4$$anon$5","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"JavaAction.scala","lineNumber":119,"className":"play.core.j.JavaAction$$anon$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"DefaultActionCreator.java","lineNumber":33,"className":"play.http.DefaultActionCreator$1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"OriginAction.java","lineNumber":53,"className":"com.backendless.old.security.OriginAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ValidateApplication.java","lineNumber":71,"className":"com.backendless.old.security.ValidateApplication","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ApplicationExistenceAndUseAction.java","lineNumber":39,"className":"com.backendless.old.security.ApplicationExistenceAndUseAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"ConsiderApiCallAction.java","lineNumber":29,"className":"com.backendless.old.security.ConsiderApiCallAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"TimeOutAction.java","lineNumber":28,"className":"com.backendless.TimeOutAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"SimultaneousApiCallLimitAction.java","lineNumber":26,"className":"com.backendless.SimultaneousApiCallLimitAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"StaticHttpResponseHeadersAction.java","lineNumber":22,"className":"com.backendless.StaticHttpResponseHeadersAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"StackOverflowHandlerAction.java","lineNumber":21,"className":"com.backendless.StackOverflowHandlerAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"CloseEntityManagerAction.java","lineNumber":36,"className":"com.backendless.CloseEntityManagerAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"call","fileName":"CurrentRequestsNumberAction.java","lineNumber":31,"className":"com.backendless.CurrentRequestsNumberAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$8","fileName":"JavaAction.scala","lineNumber":175,"className":"play.core.j.JavaAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$1","fileName":"Future.scala","lineNumber":659,"className":"scala.concurrent.Future$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$map$1","fileName":"Try.scala","lineNumber":255,"className":"scala.util.Success","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Try.scala","lineNumber":213,"className":"scala.util.Success","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$map$1","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"liftedTree1$1","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$transform$1","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Promise.scala","lineNumber":64,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$execute$1","fileName":"HttpExecutionContext.scala","lineNumber":63,"className":"play.core.j.HttpExecutionContext","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"execute","fileName":"Execution.scala","lineNumber":70,"className":"play.api.libs.streams.Execution$trampoline$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"execute","fileName":"HttpExecutionContext.scala","lineNumber":58,"className":"play.core.j.HttpExecutionContext","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"executeWithValue","fileName":"Promise.scala","lineNumber":72,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete","fileName":"Promise.scala","lineNumber":372,"className":"scala.concurrent.impl.Promise$KeptPromise$Kept","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete$","fileName":"Promise.scala","lineNumber":371,"className":"scala.concurrent.impl.Promise$KeptPromise$Kept","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"onComplete","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform","fileName":"Promise.scala","lineNumber":33,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform$","fileName":"Promise.scala","lineNumber":31,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"transform","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map$","fileName":"Future.scala","lineNumber":292,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"map","fileName":"Promise.scala","lineNumber":379,"className":"scala.concurrent.impl.Promise$KeptPromise$Successful","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"Future.scala","lineNumber":659,"className":"scala.concurrent.Future$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"JavaAction.scala","lineNumber":176,"className":"play.core.j.JavaAction","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$apply$4","fileName":"Action.scala","lineNumber":82,"className":"play.api.mvc.Action","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$mapFuture$4","fileName":"Accumulator.scala","lineNumber":167,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"Try.scala","lineNumber":213,"className":"scala.util.Try$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$mapFuture$3","fileName":"Accumulator.scala","lineNumber":167,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$andThen$1","fileName":"Function1.scala","lineNumber":57,"className":"scala.Function1","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Accumulator.scala","lineNumber":198,"className":"play.api.libs.streams.StrictAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$run$2","fileName":"Accumulator.scala","lineNumber":215,"className":"play.api.libs.streams.FlattenedAccumulator","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$flatMap$1","fileName":"Future.scala","lineNumber":307,"className":"scala.concurrent.Future","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$transformWith$1","fileName":"Promise.scala","lineNumber":41,"className":"scala.concurrent.impl.Promise","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"Promise.scala","lineNumber":64,"className":"scala.concurrent.impl.CallbackRunnable","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"processBatch","fileName":"BatchingExecutor.scala","lineNumber":55,"className":"akka.dispatch.BatchingExecutor$AbstractBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"$anonfun$run$1","fileName":"BatchingExecutor.scala","lineNumber":92,"className":"akka.dispatch.BatchingExecutor$BlockableBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"apply","fileName":"JFunction0$mcV$sp.java","lineNumber":23,"className":"scala.runtime.java8.JFunction0$mcV$sp","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"withBlockContext","fileName":"BlockContext.scala","lineNumber":85,"className":"scala.concurrent.BlockContext$","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"BatchingExecutor.scala","lineNumber":92,"className":"akka.dispatch.BatchingExecutor$BlockableBatch","nativeMethod":false},{"classLoaderName":"app","moduleName":null,"moduleVersion":null,"methodName":"run","fileName":"AbstractDispatcher.scala","lineNumber":47,"className":"akka.dispatch.TaskInvocation","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"runWorker","fileName":"ThreadPoolExecutor.java","lineNumber":1128,"className":"java.util.concurrent.ThreadPoolExecutor","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"run","fileName":"ThreadPoolExecutor.java","lineNumber":628,"className":"java.util.concurrent.ThreadPoolExecutor$Worker","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.6","methodName":"run","fileName":"Thread.java","lineNumber":834,"className":"java.lang.Thread","nativeMethod":false}],"message":"java.lang.IllegalArgumentException: argument \"content\" is null","suppressed":[],"localizedMessage":"java.lang.IllegalArgumentException: argument \"content\" is null"}

Hi @Kasey_Luft!
It seems like problem with fields mappings. What fields mappings did you used?
We will improve error message for such cases.

Regards, Andriy

@Andriy_Konoz I was using the following fields mappings:

{“data”:{“fieldsMapping”:{“userId”:“twitterUserIdInBackendless”, “screenName”:“twitterScreenNameInBackendless”}, “redirect”:true}}

@Kasey_Luft you have mistake in your JSON - “fieldsMapping” field must be placed in root of body. “redirect” field must be placed in root also.
I think this may cause your problem.
Correct variant should look in next way:

{
“fieldsMapping”: {
“userId”:“twitterUserIdInBackendless”,
“screenName”:“twitterScreenNameInBackendless”
},
“redirect”:true
}

In tutorial body formed in way that was described by me:
https://backendless.com/docs/rest/mgmt_social_settings.html
Also more about Twitter login you can find by this link:
https://backendless.com/docs/rest/users_login_with_twitter.html

Please, try to use mappings suggested by me and write back about results.

Regards, Andriy

@Andriy_Konoz Looks like that was it.

I had changed it before when I couldn’t get the API to work but after I made the first set of changes I hadn’t updated the mapping. This fixes that now! Although, using postman, it appears the redirect is in French. Is that supposed to be that way? Haven’t tested it out in my website yet. This seems to have solved my solution though, thanks!

@Kasey_Luft, about Twitter auth page language.
You can try to change its locale by providing different value in header " Accept-Language". This header is generated and sent automatically by browser for each request. It means that each user will get Twitter auth page in different locale that was choosen from one of the locales provided by that header.

More information about this header you can find by this link:

Regards, Andriy

@Andriy_Konoz @Inna_Shkolnaya

Another question. I was able to get the twitter account working with Postman, but when I am using the API call in my website I get the following error:

Would either of you happen to know what this means? I was under the impression I could just create an API request and it would run in my web app using PHP. Is there an extra step I need to do?

Does the backendless api automatically authorize the Twitter api, or is this a separate step I need to do on my own before calling this api?

Thanks!

@Kasey_Luft
Backend API automatically autorize Twitter user if for authorization was used URL generated by
http://api.backendless.com/v1/users/social/oauth/twitter/request_url
Your error indicate that something went wrong in your code since you got infinite redirect loop, which was terminated after reaching limit of redirects.

Actual workflow of autorization is next:

  1. You request autorization URL for Twitter.
  2. You redirect user by received URL.
  3. User authorize himself on the Twitter side.
  4. Twitter send you in response HTTP code for redirection to callback URL that was specified in authorization URL. Redirect URL must be present in header “Location” of response.
  5. You call redirect URL which points to Backendless.
  6. Backendless perform authorization of user and return you user data along with user auth token.

I supose that your code made wrong redirect at step 4. Check if you properly read value of “Location” header.

Regards, Andriy

@Andriy_Konoz Thanks for the detailed explanation, looking back I can’t actually see the ‘Location’ header in any of my calls.

I went back to https://backendless.com/docs/rest/mgmt_social_settings.html and realized I could never get step 6, 7, 8 to work.

When attempting to run step 6 with the following URL http://api.backendless.com/v1/users/social/oauth/twitter/request_url I got this error using the backendless app id and rest secret id

{
    "code": 2002,
    "message": "Version is disabled or provided wrong application info (application id or secret key)"
}

It was then suggested to me to try the URL found in this link here https://backendless.com/docs/rest/users_login_with_twitter.html (https://api.backendless.com/application-id/REST-api-key/users/social/oauth/twitter/request_url).

So I’m wondering if maybe I never authorized it properly in the first place and that’s why I see what I’m seeing? Or should that not be a factor?

@Kasey_Luft
In tutorial for step 6 provided outdated URL. It is ok that you used for obtaining authorization URL route from https://backendless.com/docs/rest/users_login_with_twitter.html
If you succeeded in authorization via Postman and saw JSON with user data from Backendless then there must be no problems in real authorization as long as you stick to same workflow.

What response from API did you get at line 226 in api.php file?

Regards, Andriy

@Andriy_Konoz Ok, thanks!

I am using a tool called Wappler which is a low-code software tool. A lof this stuff has already been created and I just input values. I am able to use the rest API function when connecting to Backendless login no problem but it looks like social auth is a bit tricky. I have attached the full app.php file. I am still learning the ins and outs so I am not entirely sure what all of it means. If anything pops out at you that is wonderful, if not then I will continue to pick away at it.

Thanks again!

@Kasey_Luft
If REST authentication is working correctly then, most probably, problem caused by generated code.
I recomend you to debug it using XDebug or in some other way.

Regards, Andriy