Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9305269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:53:26+00:00 2026-06-18T23:53:26+00:00

I’m doing the initial authorization for Google Drive access. I want to pass a

  • 0

I’m doing the initial authorization for Google Drive access. I want to pass a full URL in the “state” parameter so I can do an additional redirect from the page name I send over in “redirect_uri”. So my request URL looks like this…

https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=000000000000.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fmy.server.com%2Fx%2Fws-catch.php&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&access_type=offline&state=https%3a%2f%2fmy.server.com%2fRoot%2fDirectory%2fGoogle.php%3fpid%3dc907a55c-87f8-4ba8-8a16-478a9e6cba70%26prov%3dsrv50758c7a0cfcd6.527662862

Notice the “state” parameter is URL encoded. The Google documentation says that this parameter is round tripped so that I get the value I passed in. However, the state parameter appears to get partially decoded by the time it reaches the page specified in “redirect_uri”. Here is where the browser goes when I deny the auth request…

https://my.server.com/x/ws-catch.php?error=access_denied&state=https://my.server.com/Root/Directory/Google.php?pid%3Dc907a55c-87f8-4ba8-8a16-478a9e6cba70%26prov%3Dsrv50758c7a0cfcd6.527662862

Notice the unencoded “?” character now in the “state” parameter. Is this a problem with Google when it redirects? I read one post that suggested base64 encoding the parameter which I can do but I wanted to understand why it wasn’t working with URL encoding.

***edit

Here is the raw 302 from Google. Should be the same URL as pasted above.

HTTP/1.1 302 Moved Temporarily
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Thu, 14 Feb 2013 16:23:37 GMT
Location: https://my.server.com/x/ws-catch.php?error=access_denied&state=https://my.server.com/Root/Directory/Google.php?pid%3Dc907a55c-87f8-4ba8-8a16-478a9e6cba70%26prov%3Dsrv50758c7a0cfcd6.527662862
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 325
Server: GSE
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T23:53:27+00:00Added an answer on June 18, 2026 at 11:53 pm

    URL encoding does not require encoding of ‘?’ or ‘:’ or ‘/’ when appearing as query parameter values. So the responses generated by Google are correctly encoded and should not result in any parse errors on your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am doing a simple coin flipping experiment for class that involves flipping a
I'm interested in microtypography issues on the web. I want a tool to fix:
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.