accessToken
to call the (IdP) APIs as described in Call an Identity Provider API.
However, if you are receiving Access Denied
when calling the IdP API, you probably have not requested the correct permissions for the user during login. You can request the correct permissions in one of two ways.
connection_scope
parameter when calling the authorize endpoint. For example, if you want to request the https://www.googleapis.com/auth/contacts.readonly
and https://www.googleapis.com/auth/analytics
scopes from Google, you can pass these along with the connection
parameter to ensure the user logs in with their Google account:
connection_scope
parameter is URL encoded. The decoded value that is passed to Google is https://www.googleapis.com/auth/analytics, https://www.googleapis.com/auth/contacts.readonly