User Token authorisation throwing exception in Android

2224
1
06-20-2016 10:30 AM
Hari_NarayanaPochiraju
New Contributor


Hello,

I am new to this ArcGIS Map. I am developing an application where we are using a user token instead of passing username and password in User Credentials.

UserCredentials creds = new UserCredentials();

creds.setUserToken(map_token, referral);

I am stuck at this point. What do I really have to pass in as a parameter for referral? I tried passing null and empty string as a parameter but I get an error message saying "token or referral cannot be empty string"

When I passed some parameter I am getting "com.esri.core.io.EsriServiceException not found" exception

Can someone help me with this?

Thanks in advance

0 Kudos
1 Reply
AlexanderNohe1
Regular Contributor II

Hello Hari Narayana Pochiraju​,

I am going to make the assumption that you are generating the token through ArcGIS Online and not ArcGIS Server.

The referer string that is either the name of the application consuming the secure service or any other client identification string that is appropriate for the application. It is required that the referer string that was used to generate the token be supplied to this method.

What happens when you set this as the referrer:

https://www.arcgis.com