GithubHelp home page GithubHelp logo

Comments (15)

dacastro4 avatar dacastro4 commented on May 17, 2024 1

Hey guys I have an example of my gmail-json.json

{
  "access_token": "ACCESS",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "REFRESH",
  "created": 1522885414,
  "email": "EMAIL"
}

My .env

GOOGLE_PROJECT_ID=PROJECT_ID
GOOGLE_CLIENT_ID=ID.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SECRET
GOOGLE_REDIRECT_URI=/oauth/gmail/callback

Hope it helps.

from laravel-gmail.

Artanty avatar Artanty commented on May 17, 2024

After that I go to index page where I inserted:

{{ LaravelGmail::user() }}

@if(LaravelGmail::check()) logout @else login @endif

and get "Invalid token format" until I delete this check

from laravel-gmail.

fajarainul avatar fajarainul commented on May 17, 2024

did you found any solution?

from laravel-gmail.

Artanty avatar Artanty commented on May 17, 2024

no, please help me!

from laravel-gmail.

fajarainul avatar fajarainul commented on May 17, 2024

I am stuck too. I already did exactly what you did. Set values in .env, download json file provided by Google console and also put it into storage/app/gmail/tokens. One thing I know is we must provide access_token, refresh_token, and expires_in inside credentials.json, but I dont know the proper way to afford this.

from laravel-gmail.

pqrs avatar pqrs commented on May 17, 2024

@Artanty, @fajarainul, any news? I'm stuck here too.

from laravel-gmail.

Artanty avatar Artanty commented on May 17, 2024

No, i tried another library and wrapper for connect to gmail via api, but nothing.
Although gCalendar api and socialite with Google auth work fine.

from laravel-gmail.

Artanty avatar Artanty commented on May 17, 2024

Hope it helps.

Yes, it helped!
I realized that my mistake was not in gmail-json.json
I simply wrote "GOOGLE_APP_SECRET" instead of "GOOGLE_CLIENT_SECRET" in .env file.

Thank you!

from laravel-gmail.

dacastro4 avatar dacastro4 commented on May 17, 2024

I'm really glad to hear that @Artanty

from laravel-gmail.

Artanty avatar Artanty commented on May 17, 2024

I am stuck too. I already did exactly what you did. Set values in .env, download json file provided by Google console and also put it into storage/app/gmail/tokens. One thing I know is we must provide access_token, refresh_token, and expires_in inside credentials.json, but I dont know the proper way to afford this.

We don't need to download .json file and put it into storage/app/gmail/tokens.
This file is creating automatically on callback function "LaravelGmail::makeToken();"
delete it if you put it into storage/app/gmail/tokens.

from laravel-gmail.

pqrs avatar pqrs commented on May 17, 2024

Thanks @dacastro4 but I must be doing something wrong. I don't know if it is in the config or in the Google console. Is there any step by step tutorial or any working example somewhere I can look at?

from laravel-gmail.

dacastro4 avatar dacastro4 commented on May 17, 2024

@pqrs what kind of error are you getting?

from laravel-gmail.

pqrs avatar pqrs commented on May 17, 2024

No credentials found.

from laravel-gmail.

pqrs avatar pqrs commented on May 17, 2024

Solved! It works now... nothing like restart from the beginning! :)

from laravel-gmail.

iqroyan avatar iqroyan commented on May 17, 2024

Hey guys I have an example of my gmail-json.json

{
  "access_token": "ACCESS",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "REFRESH",
  "created": 1522885414,
  "email": "EMAIL"
}

My .env

GOOGLE_PROJECT_ID=PROJECT_ID
GOOGLE_CLIENT_ID=ID.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SECRET
GOOGLE_REDIRECT_URI=/oauth/gmail/callback

Hope it helps.

hey Danial access_token same of GOOGLE_CLIENT_ID?

from laravel-gmail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.