janhenkes / teamleader-php-sdk

Teamleader API v2 PHP SDK
MIT License
16 stars 25 forks source link

How do you get the access_token (authorization_token) from the redirect? #38

Closed thomasmoors closed 3 years ago

thomasmoors commented 3 years ago

As by the docs, the url returns as:

https://YOUR_REDIRECT_URI#token_type=Bearer&expires_in=900&access_token=TOKEN&state=STATE

in my case http://127.0.0.1:8000/teamleader#access_token=[SECRET]&token_type=bearer&expires_in=3600 However I run into the problem that the url uses a # instead of a ?.

As these query string values do not appear in my $_GET var https://stackoverflow.com/questions/2317508/get-fragment-value-after-hash-from-a-url-in-php

Could you be so kind as to explain how you solved this?