The authorization link for Box looks something like:
https://www.box.com/api/1.0/auth/ticketName
I’ve tried to include state in this manner:
https://www.box.com/api/1.0/auth/ticketName?state=1234
But the redirect url is formatted like this:
https://www.example.com/authenticate/?ticket=ticketName&auth_token=xyz
So my state is lost.
How can I send in state and have it come back in the redirect url?
The process is:
HttpClient client = new HttpClient();
String getUrl = "https://www.box.com/api/1.0/rest?action=get_ticket&api_key=" + API_KEY;
HttpMethod getMethod = new GetMethod(getUrl);
client.executeMethod(getMethod);
//Get ticket from response
String authorizationUrl = "https://www.box.com/api/1.0/auth/" + ticket + "?state=1234"
Box does not currently support sending in additional parameters to be echoed back to the caller during authentication. Echoing back a &state=VALUE to the caller is part of the OAuth2 flow, which we will be rolling out sometime soon for our V2 APIs.