Write a server by using SpringBoot Java and integrate Weather API from Rapid API. On the basis of that integration, expose your RESTful APIs as follows with JSON response. Authentication Method: Header-based authentication with random client id and random client secret
- Download the zip folder
- Import Project in Tools(Eclips, STS).
- Build the project
- Run the Project Run as-> Spring boot app
API 1: Get the Weather forecast summary of Any city using API (RapidApiGetForecastSummaryByLocationName)
In the below picture geeting output for Forecast Summary By Location Name
API 2: Get hourly Weather forecast details of Any city using API (RapidApiGetHourlyForecastByLocationName)
In the below picture geeting output for Hourly Forecast By Location Name
follow the steps for output
- step1: Use default issuer for access tocken {https://dev-64151434.okta.com/oauth2/default}
- step2: For access tocke we need to set authorization header a) type-> basic Auth b) username-> Client ID c) password-> CLIENT SECRETS
- d) in body we need to enter key and value After authorization header will be automatically generated when you send the request.